mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-06 18:45:48 +00:00
Spherical.cs - Remove GetPosition function
This commit is contained in:
@@ -43,23 +43,9 @@ namespace PckStudio.Rendering
|
||||
set => vector.Z = value;
|
||||
}
|
||||
|
||||
public Vector3 GetPosition()
|
||||
{
|
||||
float sineAzimuthal = (float)Math.Sin(MathHelper.DegreesToRadians(Phi));
|
||||
float cosineAzimuthal = (float)Math.Cos(MathHelper.DegreesToRadians(Phi));
|
||||
float sinePolar = (float)Math.Sin(MathHelper.DegreesToRadians(Theta));
|
||||
float cosinePolar = (float)Math.Cos(MathHelper.DegreesToRadians(Theta));
|
||||
|
||||
Vector3 direction = new Vector3();
|
||||
direction.X = cosinePolar * sineAzimuthal;
|
||||
direction.Y = sineAzimuthal;
|
||||
direction.Z = sinePolar * cosineAzimuthal;
|
||||
return direction * Radius;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Radius: {Radius}; Theta: {Theta}; Phi: {Phi}; Position: {GetPosition()}";
|
||||
return $"Radius: {Radius}; Theta: {Theta}; Phi: {Phi};";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user