swiss ok, needs more benchmark
This commit is contained in:
@@ -32,14 +32,18 @@ namespace StgSharp.Mathematics.Graphics
|
||||
public static unsafe partial class Linear
|
||||
{
|
||||
|
||||
public static float GetLength(this Vec3 vec)
|
||||
public static float GetLength(
|
||||
this Vec3 vec
|
||||
)
|
||||
{
|
||||
return Scalar.Sqrt(vec.Dot(vec));
|
||||
return MathF.Sqrt(vec.Dot(vec));
|
||||
}
|
||||
|
||||
public static float GetLength(this Vec2 vec)
|
||||
public static float GetLength(
|
||||
this Vec2 vec
|
||||
)
|
||||
{
|
||||
return Scalar.Sqrt(vec.Dot(vec));
|
||||
return MathF.Sqrt(vec.Dot(vec));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user