Ad
  • Default User Avatar

    I'm still trying to find the regex. I bet it's in there somewhere!

  • Default User Avatar

    I was fully expecting the tests to do mean stuff like [[1, 100000000], [512324, 200000000]] and hence opted for a far trickier solution. After all, it would also have to handle [[20,5000], [8000,1000000020], [4000,9000]]. In collateral, it isn't restricted to integers any more and can do [[-Math.PI, 5], [4, 9.86]]

  • Default User Avatar

    I kindly suggest changing the description to read

    a.add(b); // should return new Vector([4,6,8])
    a.subtract(b); // should return new Vector([-2,-2,-2])

    I, too, misinterpreted the add and subtract functions to modify the called object in the spirit of "+=" instead of "+" and failed the subtract test (but not the add test) and couldn't figure why until I read this discussion.