daily update on 20230227 by nitload youmu
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
@@ -9,15 +10,11 @@ namespace StgSharp.Math
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
public float Direction;
|
||||
public float Length;
|
||||
|
||||
public Vec2D(float x,float y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Direction = Calc.ATan(X,Y);
|
||||
Length = Calc.Sqrt(X * X + Y * Y);
|
||||
}
|
||||
|
||||
public bool Equals(Vec2D other)
|
||||
@@ -93,10 +90,9 @@ namespace StgSharp.Math
|
||||
return new Vec2D(vec.X/x, vec.Y/x);
|
||||
}
|
||||
|
||||
public float x(Vec2D others)
|
||||
public Vec3D to3D()
|
||||
{
|
||||
return this.X * others.Y - this.Y * others.X;
|
||||
return new Vec3D(this.X, this.Y, 0.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user