Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

UnitInterval

Represent it internally as either fixed or floating point and divide to convert in and out if needed.

With a nice type system you could even genericize the type over integer constants



Others have already said it, but that name is for a type whose values are intervals, not a type whose values are numbers within an interval.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: