#
luxiaotao1123
2024-04-22 1ef8e8f18cc3822d828b97d67483fd1f89ba0f06
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as THREE from 'three';
 
export const isNullOfUndefined = (param) => {
    if (null === param || undefined === param) {
        return true;
    } else {
        return false;
    }
}
 
export const rotationToNum = (rotation) => {
    let res = rotation * 180 / Math.PI;
    if (res < 0) {
        res += 360;
    } else if (res > 360) {
        res -= 360;
    }
    return res;
}
 
export const rotationParseNum = (num) => {
    return num * Math.PI / 180;
}