Skip to content

Commit 33da2f7

Browse files
BartSchuurmanszth
authored andcommitted
Fix Math.atan2 argument order
1 parent 3a45914 commit 33da2f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Core__Math.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module Int = {
2828
@val external asinh: float => float = "Math.asinh"
2929
@val external atan: float => float = "Math.atan"
3030
@val external atanh: float => float = "Math.atanh"
31-
@val external atan2: (~x: float, ~y: float) => float = "Math.atan2"
31+
@val external atan2: (~y: float, ~x: float) => float = "Math.atan2"
3232
@val external cbrt: float => float = "Math.cbrt"
3333
@val external ceil: float => float = "Math.ceil"
3434
@val external cos: float => float = "Math.cos"

src/Core__Math.resi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Math.atanh(0.5) // 0.5493061443340548
386386
external atanh: float => float = "Math.atanh"
387387

388388
/**
389-
`atan2(~x, ~y)` returns the angle (in radians) of the quotient `y /. x`. It is
389+
`atan2(~y, ~x)` returns the angle (in radians) of the quotient `y /. x`. It is
390390
also the angle between the *x*-axis and point (*x*, *y*).
391391
See [`Math.atan2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2) on MDN.
392392
@@ -400,7 +400,7 @@ Math.atan2(~x=15.0, ~y=90.0) // 0.16514867741462683
400400
```
401401
*/
402402
@val
403-
external atan2: (~x: float, ~y: float) => float = "Math.atan2"
403+
external atan2: (~y: float, ~x: float) => float = "Math.atan2"
404404

405405
/**
406406
`cbrt(v)` returns the cube root of argument `v`.

0 commit comments

Comments
 (0)