Closed notlion closed 13 years ago
What do you think about calling it dist() and distSquared()?
You are also missing semicolons after the last } of the function (since it's an assignment statement).
Otherwise sounds great.
Oh yeah, also a period at the end of comments! :)
Doh I knew there would be something. Okay. Made those changes and re-committed.
What do you think about truncating distSquared and lengthSquared to distSq and lengthSq?
The others are squared (lengthSquared). I realize it's length and not len, so maybe it should have been distance() afterall, but dist feels better still in this case. We'll see.
Thanks!
I think we should have this. The other option is to do something like:
which creates a new object, vs: