Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think this is all working now.
Phew! Yeh it seems to be working now! I think some of my maths was wrong in the original solution. Sorry it was so drawn out, I was about to give up!
Obviously I have already done what you suggested. I have put in easy solutions and tested them against the results and on my side they seem to be all correct. Sorry to trouble you.
The hour hand should now move in increments of a minute and then minute hand should just move in increments of a minute as it should have been doing so before.
I think I have fixed this now, could you give it a test and see what happens?
The hour hand should now move once per minute.
Okay, I removed the floor's. Could you tell me how assertApproxEquals works, because it seems to cause some issues with my Example Test Cases now. What is the accuracy that it expects from the answer?
Yes I realised this is a problem. I have not factored in that the hour hand with move to the location of the minutes. I'll fix this asap. Thanks!
Okay, I think I've fixed this now. I have floor'ed the final answer given by the solution so it should match up with the requested answer. Could you give me your solution so I can test it again and see if it works with yours?
Okay I've put the new test cases in so it should test for an approximate answer. Do you know what level of approximation it tests for, like what are the limits?
Could you give me an example of how to use Test.assertApproxEquals with object properties, so that I can compare all the seperate values for each hand?
Ah yes I see what you mean. I will try and code it so that the hour hand has to be in the correct position depending on the number of minutes to the nearest minute and the minute hand with just click to the nearest minute. Do you think that would be a good solution?
So the values are turned into integers with Math.floor when you calculate the position using the trigonometric function. There was an issue in there with the Y values being the wrong way around (positive when they should be negative and vice versa), but this should be fixed now. Perhaps try again and see if you can get solve it.
I had stated in the description that it is set to cartestian co-ordinates but the code didn't represent this. This should be fixed now. Y should be positive when heading north and negative when heading south from (0,0). I also switched it from assertSimilar to assertDeepEquals, thanks.
I have put in a statement now that will ignore all negative 0 values and just return them as 0, so -0 should be ignored.
Loading more items...