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.
Rotating a vector 90 degrees counter-clockwise from x axis should give a vector pointing at the +y direction, so a [-1,2] would be absurd. You should recheck your math.
Also, the tests require rounding to 10 decimal places, not the nearest integer.
What did I even do
I just tested it, since I couldn't believe that this should work. But actually, the tests are simply botched. They shouldn't use
Test.expect
butTest.assertSimilar
, and they should use random values (not only fixed ones). The.every
test is completely flawed if both arrays have different lengths.I guess that @theintern was just trying to show loopholes in the tests.
cheater
When submitting my result for this I get:
90 1
90==-0.4480736161291701
Test Passed: Value == [0,1]
90 2
90==-0.8961472322583403
Expected: [0,2], instead got: [-1,2]
as you can see for 90,2 where 2 is the radius my math totals -0.89 and that rounded is -1 but the test fixture expects 0, why is that?