From: Alexis Laferrière Date: Tue, 23 Feb 2016 16:20:04 +0000 (-0500) Subject: lib/core: fix order of the params of `atan(y, x)` X-Git-Url: http://nitlanguage.org lib/core: fix order of the params of `atan(y, x)` Signed-off-by: Alexis Laferrière --- diff --git a/lib/core/math.nit b/lib/core/math.nit index bdd7daa..36cf3fe 100644 --- a/lib/core/math.nit +++ b/lib/core/math.nit @@ -524,11 +524,11 @@ redef class Sys end end -# Computes the arc tangent given `x` and `y`. +# Computes the arc tangent given `y` and `x`. # # assert atan2(-0.0, 1.0) == -0.0 # assert atan2(0.0, 1.0) == 0.0 -fun atan2(x: Float, y: Float): Float `{ return atan2(x, y); `} +fun atan2(y: Float, x: Float): Float `{ return atan2(y, x); `} # Approximate value of **pi**. fun pi: Float do return 3.14159265