Fix Snap.atan2 to use 2 arguments

master^2
Pablo Kebees 2022-03-13 07:40:56 +08:00 committed by GitHub
parent b365287722
commit 6093531a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -379,11 +379,12 @@ Snap.atan = function (num) {
[ method ] [ method ]
** **
* Equivalent to `Math.atan2()` only works with degrees, not radians. * Equivalent to `Math.atan2()` only works with degrees, not radians.
- num (number) value - x (number) value
- y (number) value
= (number) atan2 in degrees = (number) atan2 in degrees
\*/ \*/
Snap.atan2 = function (num) { Snap.atan2 = function (x, y) {
return Snap.deg(math.atan2(num)); return Snap.deg(math.atan2(x, y));
}; };
/*\ /*\
* Snap.angle * Snap.angle