GodotComponentTest/Globals.cs

12 lines
480 B
C#
Raw Normal View History

using Godot;
2023-11-18 22:32:57 +01:00
public static class Globals {
2023-05-03 12:01:30 +02:00
public const float EpsPosition = 0.01f;
public const float EpsPositionSquared = EpsPosition * EpsPosition;
public const float EpsRadians = 0.1f * Mathf.Pi / 180f;
public const float EpsRadiansSquared = EpsRadians * EpsRadians;
2023-11-18 22:32:57 +01:00
public static float CalcPlaneAngle(Transform worldTransform) {
return worldTransform.basis.x.SignedAngleTo(Vector3.Right.Rotated(Vector3.Up, Mathf.Pi * 0.5f), -Vector3.Up);
}
}