Ruby application that determines valid finds the angle between the hands of a clock.
- Clone application from github repository: https://github.com/langlk/clock_angle.git
- From this repository run clock_angle.rb
- Returns 0 degrees if the two hands overlap exactly.
- Example input: 12:00
- Example output: 0
- If the time is precisely on the hour, returns the hour's angle from 12 o'clock in degrees
- Example input: 3:00
- Example output: 90
- If the minute amount is non-zero, return the hour's angle from 12 o'clock minus the minute's angle from 12 o'clock in degrees.
- Example input: 12:30
- Example output: 165
- If the resulting angle is greater than 180 degrees, return 360 - result
- Example input: 9:00
- Example output: 90
We are unaware of any bugs at this time.
If you run into any issues or have questions, ideas or concerns, or if you would like to contribute to the code, please contact: [email protected] or [email protected] .
This application was created using Ruby
Copyright (c) 2017 Kelsey Langlois and L. Devin MacKrell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.