Created
August 6, 2021 13:02
-
-
Save technikhil314/7430ef01f3f27485b700dc20dbc5e2da to your computer and use it in GitHub Desktop.
Return only positive angle degrees
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function positiveDeg(input) { | |
| const actualInput = input % 360; | |
| return actualInput >= 0 ? actualInput : 360 + actualInput; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment