You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the call to scalar returns a float value of the measurement in terms of its base unit (ex. "1 km"'s scalar -> "1000.0"); this contradicts the behavior in js-quantities though, where scalar() returns the value of the measurement and baseScalar() returns the value in terms of the base unit.
After thinking about it a bit, it seems like scalar probably isn't used for much from the public API sense--it's primarily used when doing math on two compatible measurements or converting one measurement to another compatible unit type (we have to reduce down to that base units to do any of that). I think that just renaming scalar to base_scalar should clarify the API a bit.
The text was updated successfully, but these errors were encountered:
Right now the call to
scalar
returns a float value of the measurement in terms of its base unit (ex. "1 km"'s scalar -> "1000.0"); this contradicts the behavior in js-quantities though, wherescalar()
returns the value of the measurement andbaseScalar()
returns the value in terms of the base unit.After thinking about it a bit, it seems like
scalar
probably isn't used for much from the public API sense--it's primarily used when doing math on two compatible measurements or converting one measurement to another compatible unit type (we have to reduce down to that base units to do any of that). I think that just renamingscalar
tobase_scalar
should clarify the API a bit.The text was updated successfully, but these errors were encountered: