Closed pixelzoom closed 5 years ago
I'm jumping on perpendicular
, @jbphet is on magnitudeSquared
.
The conversions for magnitudeSquared
and perpendicular
sound now be complete. Marking for dev meeting to decide who is up next.
It appears those were the last two. @jbphet if you concur, this issue can be closed. If I'm wrong, please let me know and re-label for dev meeting.
Yes indeed, those were the last 2 that @jonathanolson and I identified in https://github.com/phetsims/dot/issues/87#issue-413131104. So I'll take the liberty of closing. Feel free to reopen if there's anything I've missed here.
I took a look at all of the
Vector2
,Vector3
, andVector4
methods that take zero arguments, i.e.function()
. Discussed with @jonathanolson and here are our conclusions.These were already converted by @samreid and @Denz1994 in https://github.com/phetsims/dot/issues/84:
magnitude
angle
These methods are operations that mutate the Vector2 instance. We won't change these.
normalize
roundSymmetric
negate
These methods are operations that return a new instance. There's a well-established naming convention that associates these methods with their mutator versions (e.g.
normalize
andnormalized
), and that convention is used throughout dot. So we won't change these.normalized
roundedSymmetric
negated
So that leaves only 2 methods to convert:
magnitudeSquared
(Vector2, Vector3, Vector4), 32 occurrences of ".magnitudeSquared("perpendicular
(Vector2), 40 occurrences of ".perpendicular("