-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pixels.[int,float,toInt,toFloat] #28
Comments
|
Problem: what should
|
Aliasing-to- |
Similar to the corresponding functions in
Quantity
:A little less flexible than
Pixels.pixels
/Pixels.inPixels
(not generic onnumber
type) but a bit more clear/explicit and read better when used in prefixed form (Pixels.toInt
vs.Pixels.inPixels
).Seems like a good general pattern to follow for any quantity type where the units type is synonymous with the quantity itself (pixels, game tiles, grid cells etc.) as opposed to ones where the same quantity can be expressed in many different units (length in meters/centimeters/feet, duration in hours/minutes/seconds, etc.).
The text was updated successfully, but these errors were encountered: