ArcSin v0.1.0

Source
Returns the inverse sine, in radians.

Package: Math

Signature

func ArcSin(x: float64) -> float64;
func ArcSin(x: float32) -> float32;

Parameters

NameTypeDescription
xfloat64 / float32A value in [-1, 1].

Returns

The angle in [-HalfPi, HalfPi] whose sine is x. ArcSin(±1.0) is ±HalfPi. For |x| > 1.0 the result is a NaN, since no real angle has that sine; a NaN argument also propagates.

Example

import Math::ArcSin;

func Main() -> int {
    let a = ArcSin(1.0); // 1.5707963267948966 (HalfPi)
    let b = ArcSin(0.0); // 0.0
    return 0;
}

See also

  • Math — the package overview
  • Sin — the function ArcSin inverts
  • ArcCos / ArcTan — the other inverse trigonometric functions