- Members of
BOUNDED can always have a clamp function that enforces the top/bottom range
- Members of
BOUNDED can always have a function t => option(t) that ensures the value is in range
- Members of
BOUNDED can be wrapped forward or backward if they can be converted to/from a value that is a member of EUCLIDEAN_RING and ORD
I'm not sure how much of this is broadly useful, but it was useful for Hour, Minute, Second, etc, and it seems like it might be useful for any BOUNDED types that want to validate themselves.
BOUNDEDcan always have aclampfunction that enforces thetop/bottomrangeBOUNDEDcan always have a functiont => option(t)that ensures the value is in rangeBOUNDEDcan be wrapped forward or backward if they can be converted to/from a value that is a member ofEUCLIDEAN_RINGandORDI'm not sure how much of this is broadly useful, but it was useful for
Hour,Minute,Second, etc, and it seems like it might be useful for anyBOUNDEDtypes that want to validate themselves.