feat: add Num.atan(x) method mapping to C atan2 for quadrant-aware arc tangent
Adds a new `atan(_)` primitive method to the Num class that wraps the C `atan2` function, allowing callers to compute the arc tangent of the number divided by a given argument `x` while using the signs of both numbers to determine the correct quadrant of the result. The implementation registers the primitive `num_atan2` in the core VM initialization and documents the new method in the core library reference.
This commit is contained in:
@@ -20,6 +20,11 @@ The arc sine of the number.
|
||||
|
||||
The arc tangent of the number.
|
||||
|
||||
### **atan**(x)
|
||||
|
||||
The arc tangent of the number when divided by `x`, using the signs of the two
|
||||
numbers to determine the quadrant of the result.
|
||||
|
||||
### **ceil**
|
||||
|
||||
Rounds the number up to the nearest integer.
|
||||
|
||||
Reference in New Issue
Block a user