Function in prelude::math auto-imported

asin

fn asin(float x) -> float
Source: compiler/src/builtin_docs/prelude/math.hy

Returns the arcsine of x, in radians in -pi/2..=pi/2.

x outside -1.0..=1.0 gives NaN.

Parameters#

NameType
xfloat

Returns#

float

Examples#

use tests::assert;
assert!(asin(0.0) == 0.0);
assert!(asin(1.0) == 3.141592653589793 / 2.0);

See also#

  • sin: Returns the sine of x (in radians).
  • cos: Returns the cosine of x (in radians).
  • tan: Returns the tangent of x (in radians).
  • sqrt: Returns the square root of x.
  • floor: Returns the largest whole number less than or equal to x, as a float.
  • ceil: Returns the smallest whole number greater than or equal to x, as a float.
  • exp: Returns e raised to the power x.
  • ln: Returns the natural logarithm of x.
↑ ↓ navigate ↵ open