daily uodate on 20240411 by nitload youmu, camera complete
This commit is contained in:
@@ -88,10 +88,7 @@ namespace StgSharp.Math
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public float Dot(vec3d right)
|
||||
{
|
||||
Vector4 vector4 = this.vec * right.vec;
|
||||
return vector4.X
|
||||
+ vector4.Y
|
||||
+ vector4.Z;
|
||||
return Vector3.Dot(v,right.v);
|
||||
}
|
||||
|
||||
public bool Equals(vec3d other)
|
||||
@@ -200,8 +197,23 @@ namespace StgSharp.Math
|
||||
public static class Vec3d
|
||||
{
|
||||
|
||||
public static vec3d Unit => new vec3d(1, 1, 1);
|
||||
public static bool IsParallel(vec3d left, vec3d right)
|
||||
{
|
||||
return Cross(left,right) == Zero;
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static vec3d Cross(vec3d left, vec3d right)
|
||||
{
|
||||
return Linear.Cross(left, right);
|
||||
}
|
||||
|
||||
public static vec3d One => new vec3d(1, 1, 1);
|
||||
public static vec3d Zero => new vec3d(0, 0, 0);
|
||||
|
||||
public static vec3d UnitZ => new vec3d(0, 0, 1);
|
||||
public static vec3d UnitX => new vec3d(1, 0, 0);
|
||||
public static vec3d UnitY => new vec3d(0, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user