Sidechair

math.asin()

Browse the reference

Returns the arcsine of a number, an angle in radians whose sine is that number.

Try it in the editor

math.asin is the inverse of math.sin. It accepts values from -1 to 1 and returns an angle between -math.pi / 2 and math.pi / 2.

Outside the range -1 to 1 there is no angle, and the result is na.

Syntax

Pine Script
math.asin(angle: simple int/float) -> simple float
math.asin(angle: input int/float) -> input float
math.asin(angle: const int/float) -> const float
math.asin(angle: series int/float) -> series float

Arguments

NameTypeDefaultDescription
angleconst/input/simple/series int/floatrequiredA value from -1 to 1. Anything outside that range gives na.

Returns

const/input/simple/series float: the angle in radians.

Remarks

Example

Pine ScriptArcsine of a scaled seriesOpen in editor
//@version=6
indicator("Arcsine")
x = ta.rsi(close, 14) / 50 - 1
plot(math.todegrees(math.asin(x)), "Angle (degrees)", color = color.blue)

See also

Runs on Sidechair