daily update on 20230227 by nitload youmu

This commit is contained in:
Nitload
2023-02-27 16:56:31 +08:00
parent 770150767b
commit 035fb9a432
25 changed files with 268 additions and 96 deletions
+3 -7
View File
@@ -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);
}
}
}