Replace Math with MathF

This commit is contained in:
VaDiM
2025-01-31 17:55:47 +03:00
parent a8bb6c714b
commit 185348d9b8
10 changed files with 41 additions and 40 deletions
+3 -3
View File
@@ -45,9 +45,9 @@ namespace AssetStudio
public override bool Equals(object other)
{
if (!(other is Vector2))
if (!(other is Vector2 vector2))
return false;
return Equals((Vector2)other);
return Equals(vector2);
}
public bool Equals(Vector2 other)
@@ -73,7 +73,7 @@ namespace AssetStudio
public float Length()
{
return (float)Math.Sqrt(LengthSquared());
return MathF.Sqrt(LengthSquared());
}
public float LengthSquared()
+3 -3
View File
@@ -49,9 +49,9 @@ namespace AssetStudio
public override bool Equals(object other)
{
if (!(other is Vector3))
if (!(other is Vector3 vector3))
return false;
return Equals((Vector3)other);
return Equals(vector3);
}
public bool Equals(Vector3 other)
@@ -79,7 +79,7 @@ namespace AssetStudio
public float Length()
{
return (float)Math.Sqrt(LengthSquared());
return MathF.Sqrt(LengthSquared());
}
public float LengthSquared()
+3 -3
View File
@@ -61,9 +61,9 @@ namespace AssetStudio
public override bool Equals(object other)
{
if (!(other is Vector4))
if (!(other is Vector4 vector4))
return false;
return Equals((Vector4)other);
return Equals(vector4);
}
public bool Equals(Vector4 other)
@@ -93,7 +93,7 @@ namespace AssetStudio
public float Length()
{
return (float)Math.Sqrt(LengthSquared());
return MathF.Sqrt(LengthSquared());
}
public float LengthSquared()