phetsims / dot

A math library with a focus on mutable and immutable linear algebra for 2D and 3D applications.
http://scenerystack.org/
MIT License
13 stars 6 forks source link

Vector2Property to get units? #107

Closed zepumph closed 3 years ago

zepumph commented 3 years ago

For PhET-iO, it was requested that some Vector2 Properties could get units. I think it would be awesome to add this. @samreid what do you think? I was just going to use units.js and copy the same sort of pattern as NumberProperty. Then add that to studio.

See https://github.com/phetsims/projectile-motion/issues/219 for the requests for places like:

Units to: projectileMotion.introScreen.model.measuringTape.basePositionProperty: m projectileMotion.introScreen.model.measuringTape.tipPositionProperty: m projectileMotion.introScreen.model.tracer.positionProperty: m

samreid commented 3 years ago

Units are already implemented in Property, not in NumberProperty, so it is possible Vector2Property already has support for units.

zepumph commented 3 years ago

Oh I see. Let me see better. BTW this would be best to link https://github.com/phetsims/projectile-motion/issues/244 to.

zepumph commented 3 years ago

Seems like it! Thanks for the reminder. Sorry to bother.

image