Update math-util.js

This commit is contained in:
ecc521 2019-06-10 11:42:32 -04:00 committed by GitHub
parent 6ec974f710
commit 4ce6f4f7c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ class MathUtil {
case 270:
return -Infinity;
default:
return parseFloat(Math.tan((Math.PI * angle) / 180).toFixed(10));
return Math.round(Math.tan(angle / 180 * Math.PI) * 1e10) / 1e10;
}
}