Skip to content

Commit

Permalink
Merge pull request #38 from okcoker/fix-deg-to-rad
Browse files Browse the repository at this point in the history
Fix degreesToRad util
  • Loading branch information
alampros authored Mar 13, 2019
2 parents db4e240 + 3080a6d commit 04db715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function rectIntersect(r0: IRect, r1: IRect) {
}

export function degreesToRads(degrees: number) {
return degrees / (180 * Math.PI)
return degrees * Math.PI / 180
}

export function radsToDegrees(radians: number) {
Expand Down

0 comments on commit 04db715

Please sign in to comment.