Inverse trig functions and atan2

This commit is contained in:
2025-09-18 11:00:00 +10:00
parent 6ad56ccc5f
commit b625bc6244
4 changed files with 152 additions and 1 deletions

View File

@@ -18,6 +18,22 @@ Gets the cos of input.
Gets the tan of input.
### fun -double !asin -double &input
Finds the angle *x* in the range [-pi/2, pi/2] such that sin(x) equals the input.
### fun -double !acos -double &input
Finds the angle *x* in the range [0, pi] such that cos(x) equals the input.
### fun -double !atan -double &input
Finds the angle *x* in the range [-pi/2, pi/2] such that tan(x) equals the input.
### fun -double !atan2 -double &y -double &x
Finds the angle in the range (-pi, pi] between the positive x axis and the point (x,y). This is equivalent to atan(y/x) for positive values of x.
### fun -double !intexp -double &base -int &power
Returns base^power, for positive integer values of power. Returns 1 if power is non-positive (and thus is inaccurate for negative values of power).