Closed bootstraponline closed 12 years ago
That's because you can call Vector.add(-x, -y) if you already have the components.
That is minutely more expensive than direct subtraction, but clearly performance is not an issue if you're asking for the version that creates a new Vector in which to store the result.
I could see the value of expanding the API to include Vector.subtract(x, y, Vector result). Anyway, I'll add them both, it's not a big deal.
add (float x, float y)
exists, however there's no corresponding version for subtraction.