6e927095e1
This should fix https://github.com/flutter/flutter/issues/80221 Change-Id: I25e0ad58bcaad95b43cc94476af0e241e17ac244 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397289 Reviewed-by: Kevin Lubick <kjlubick@google.com>
19 lines
370 B
JavaScript
19 lines
370 B
JavaScript
/**
|
|
* This file houses miscellaneous helper functions and constants.
|
|
*/
|
|
|
|
var nullptr = 0; // emscripten doesn't like to take null as uintptr_t
|
|
|
|
|
|
function radiansToDegrees(rad) {
|
|
return (rad / Math.PI) * 180;
|
|
}
|
|
|
|
function degreesToRadians(deg) {
|
|
return (deg / 180) * Math.PI;
|
|
}
|
|
|
|
function almostEqual(floata, floatb) {
|
|
return Math.abs(floata - floatb) < 0.00001;
|
|
}
|