Negative numbers are only permitted in the degree column. Any minutes or seconds need to be a positive integer from 0-59 inclusive. Although an angle has a combined decimal and base 60 format, I treat the base 60 components of an angle like the fractional components of a decimal are treated; negatives get propagated to the next highest term. You can find the procedure Albert Klaf's Trigonometry Refresher on page 12; the section is available on google books. As I was going through the tests, I noticed some errors in the tests that I have no idea how they made their way into the code. I suspect they were just typos or search/replace errors I had missed. Regarding extensions to decimals -- that is a planned future extension based upon the problems in the study guide I am going through. Instead of doing the problems manually, I write a program to calculate the solutions, and learn Perl testing in the process :)
In reply to Re^4: How to write testable command line script?
by thechartist
in thread How to write testable command line script?
by thechartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |