|
@@ -1,10 +1,3 @@
|
|
|
-let _seed = 1234567;
|
|
|
-
|
|
|
-const DEG2RAD = Math.PI / 180;
|
|
|
-const RAD2DEG = 180 / Math.PI;
|
|
|
-
|
|
|
-//
|
|
|
-
|
|
|
const _lut = [];
|
|
|
|
|
|
for ( let i = 0; i < 256; i ++ ) {
|
|
@@ -13,18 +6,14 @@ for ( let i = 0; i < 256; i ++ ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-const hasRandomUUID = typeof crypto !== 'undefined' && 'randomUUID' in crypto;
|
|
|
-
|
|
|
-function generateUUID() {
|
|
|
-
|
|
|
- if ( hasRandomUUID ) {
|
|
|
+let _seed = 1234567;
|
|
|
|
|
|
- return crypto.randomUUID().toUpperCase();
|
|
|
|
|
|
- }
|
|
|
+const DEG2RAD = Math.PI / 180;
|
|
|
+const RAD2DEG = 180 / Math.PI;
|
|
|
|
|
|
- // TODO Remove this code when crypto.randomUUID() is available everywhere
|
|
|
- // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
|
|
|
+// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
|
|
|
+function generateUUID() {
|
|
|
|
|
|
const d0 = Math.random() * 0xffffffff | 0;
|
|
|
const d1 = Math.random() * 0xffffffff | 0;
|