skia2/modules/canvaskit/util.js
Kevin Lubick 6e927095e1 [canvaskit] Remove isNode and saveAsPicture
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>
2021-04-16 20:55:54 +00:00

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;
}