misc.ts 346 B

12345678910111213
  1. /**
  2. * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. */
  6. export function degToRad (deg: number) {
  7. return deg * 0.01745 // deg * Math.PI / 180
  8. }
  9. export function radToDeg (rad: number) {
  10. return rad * 57.29578 // rad * 180 / Math.PI
  11. }