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.
Think the bug lies in your
.equals
method.What should you compare ?
It seems your
.equals
method returnstrue
when 2 vectors.components
are of different lengthes.Are you sure this is the expected behavior ? ( Isn't (1, 2) equals (1, 2) ? )
In your
.add
,.subtract
&.dot
methods you test first if the vectors are equals.That means you can't add (or sub, or dot) (1, 2) & (3, 4)...
Hope it helps.
Can you post your solution so I can see about it?