Ad
  • Custom User Avatar

    Think the bug lies in your .equals method.

    What should you compare ?

  • Custom User Avatar
    • It seems your .equals method returns true 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.

  • Custom User Avatar

    Can you post your solution so I can see about it?