update dist and lib
This commit is contained in:
parent
abba9ad931
commit
9318431c88
|
@ -38,8 +38,8 @@
|
||||||
const minusY = Math.abs(pointOne[1] - pointTwo[1]);
|
const minusY = Math.abs(pointOne[1] - pointTwo[1]);
|
||||||
return Math.sqrt(minusX * minusX + minusY * minusY);
|
return Math.sqrt(minusX * minusX + minusY * minusY);
|
||||||
}
|
}
|
||||||
function uuid() {
|
function uuid(hasHyphen) {
|
||||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
return (hasHyphen ? 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' : 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx').replace(/[xy]/g, function (c) {
|
||||||
const r = Math.random() * 16 | 0;
|
const r = Math.random() * 16 | 0;
|
||||||
const v = c == 'x' ? r : r & 0x3 | 0x8;
|
const v = c == 'x' ? r : r & 0x3 | 0x8;
|
||||||
return v.toString(16);
|
return v.toString(16);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -38,10 +38,10 @@ export function getPointDistance (pointOne, pointTwo) {
|
||||||
return Math.sqrt(minusX * minusX + minusY * minusY)
|
return Math.sqrt(minusX * minusX + minusY * minusY)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function uuid () {
|
export function uuid (hasHyphen) {
|
||||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
return (hasHyphen ? 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' : 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx').replace(/[xy]/g, function (c) {
|
||||||
const r = Math.random() * 16 | 0
|
const r = Math.random() * 16 | 0
|
||||||
const v = c == 'x' ? r : (r & 0x3 | 0x8)
|
const v = c == 'x' ? r : (r & 0x3 | 0x8)
|
||||||
return v.toString(16)
|
return v.toString(16)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue