diff --git a/src/mol-math/misc.ts b/src/mol-math/misc.ts new file mode 100644 index 0000000000000000000000000000000000000000..98dd209ea168bb3b4e25e897d6e19b424fa6719f --- /dev/null +++ b/src/mol-math/misc.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author Alexander Rose <alexander.rose@weirdbyte.de> + */ + +export function degToRad (deg: number) { + return deg * 0.01745 // deg * Math.PI / 180 +} + +export function radToDeg (rad: number) { + return rad * 57.29578 // rad * 180 / Math.PI +} \ No newline at end of file