public static float normalizeAngle(float angle, float min, float max) { float result = angle; if (min < 0.0f) { while (result <= -180.0f) result += 360.0f; while (result > 180.0f) result -= 360.0f; } else { while (result < 0.0f) result += 360.0f; while (result >= 360.0f) result -= 360.0f; } return PLMath.valueInRange(result, min, max); }
public static float normalizeFov(float fov, float min, float max) { return PLMath.valueInRange(fov, min, max); }
public static float normalizeFov(float fov, PLRange range) { return PLMath.valueInRange(fov, range); }