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
There's a value_unsafe parameter, but it's unclear to me if that's the "right" way to do things if you just want to extract the value (sans the units). It'd be nice if this were explicitly stated somewhere, too, so that new users can discover it without asking.
Thanks!
The text was updated successfully, but these errors were encountered:
In this situation, I explicitly divide by what I expect the units to be. That should give you a dimensionless value. Then you can use the value() method from the Dimensionless trait. Note that value() returns a reference, so you'll have to dereference it as well:
I think a dimensionless your is valuable because when you've got an f64 it may or may not actually hold a dimensional value, e.g. a distance a user provided. If an f64 were treated as dimensionless then it would be very hard to audit a coffee to ensure that all dimensions are correct.
There's a value_unsafe parameter, but it's unclear to me if that's the "right" way to do things if you just want to extract the value (sans the units). It'd be nice if this were explicitly stated somewhere, too, so that new users can discover it without asking.
Thanks!
The text was updated successfully, but these errors were encountered: