Found a bug in 2.4.1 :(. Not big enough to call for 2.4.2 though.
This commit is contained in:
parent
56eaf31c7b
commit
f3db47e47f
@ -25,7 +25,7 @@ public static class Mathf
|
|||||||
public static Angle ArcSin(float value)
|
public static Angle ArcSin(float value)
|
||||||
{
|
{
|
||||||
if (value > 1 || value < -1) throw new ArgumentOutOfRangeException(nameof(value));
|
if (value > 1 || value < -1) throw new ArgumentOutOfRangeException(nameof(value));
|
||||||
return (SolveNewton(x => Sin(x) - value, 0), Angle.Type.Degrees);
|
return (SolveNewton(x => Sin(x) - value, 0), Angle.Type.Radians);
|
||||||
}
|
}
|
||||||
public static Angle ArcTan(float value) => ArcSin(value / Sqrt(1 + value * value));
|
public static Angle ArcTan(float value) => ArcSin(value / Sqrt(1 + value * value));
|
||||||
public static Angle ArcTan2(float a, float b) => ArcTan(a / b);
|
public static Angle ArcTan2(float a, float b) => ArcTan(a / b);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user