• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * This file houses miscellaneous helper functions and constants.
3 */
4
5var nullptr = 0; // emscripten doesn't like to take null as uintptr_t
6
7
8function radiansToDegrees(rad) {
9  return (rad / Math.PI) * 180;
10}
11
12function degreesToRadians(deg) {
13  return (deg / 180) * Math.PI;
14}
15
16function almostEqual(floata, floatb) {
17  return Math.abs(floata - floatb) < 0.00001;
18}
19