This blog uses responsible cookies for functionality and user preferences.
Google Analytics is used for collecting general public information to understand how my blog is used.
Learn moreDear visitors,
This blog and the Tigarus.com network will be changing our website software in May (2024). There will be some down time and there will be a change to the webpage addresses.
We will also be removing the Anime blogs. The Rocksmith Songs website will be unavailable of a few weeks or months while I move the database to the new software.
At the moment we are running on Wordpress, the new software is an in-house project which is 57 times faster. It will also provide more freedom for development.
Thank you for understanding.
Script Title: degToClock
Programming Language: Java Script
Date Completed: 2012/09/02
Purpose: To determine the 12 hour clock position from the given degrees, used for clocks or determining direction. Returns a number, or undefined if the degrees argument is not valid.
Description: To determine the 12 hour clock position from degrees, used to determine the hour of a 12 hour clock on a circle or to determine direction based on a clock. Returns a number ( 0,1,2,3,4,5,6,7,8,9,10,11 ) zero meaning 12 o’clock. Returns undefined if the degrees argument is not a number, is a value greater than 360 or is a value lesser than -360.
Method:
degToClock ( degrees_n ); // Returns a value of 0-11
Arguments: degrees_n, accepts a number between -360 to 360.
Note: the value of zero is equal to 12 o’clock.
Example Usage:
degToClock ( 180 ); // Returns 6
degToClock ( -180 ); // Returns 6
degToClock ( 760 ); // Returns undefined
Terms of Use, Cookies, Privacy, and more, see Terms and Privacy
Third-party copyrights and trademarks featured on this site are owned by their respected holders.
Website written and designed by Patcoola 2019, some rights reserved.
This blog uses responsible cookies for functionality and user preferences.
Google Analytics is used for collecting general public information to understand how my blog is used.
Learn moreDear EU visitor, I am required to ask you consent for the following.