Skip to content

Instantly share code, notes, and snippets.

@nyawach
Created January 27, 2020 02:20
Show Gist options
  • Save nyawach/f16d3349f35d42b85642ebcc7f8a5b18 to your computer and use it in GitHub Desktop.
Save nyawach/f16d3349f35d42b85642ebcc7f8a5b18 to your computer and use it in GitHub Desktop.
const {PI} = Math
const rad1 = PI / 180
export const deg2rad = (deg: number) => deg * rad1
export const rad2deg = (rad: number) => rad / rad1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment