update dist and lib

This commit is contained in:
jiaming743
2020-05-25 15:57:26 +08:00
parent 71a9be2a13
commit e938b66dc0
17 changed files with 136 additions and 101 deletions

View File

@ -37,3 +37,11 @@ export function getPointDistance (pointOne, pointTwo) {
return Math.sqrt(minusX * minusX + minusY * minusY)
}
export function uuid () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
const r = Math.random() * 16 | 0
const v = c == 'x' ? r : (r & 0x3 | 0x8)
return v.toString(16)
})
}