Skip to content
CCPEDIAby Unity Nodes
App Development

Infinity for `Numeric`

2 posts176 viewsLast activity Apr 2022

  1. LucianoOP

    Does the Numeric type have a value for infinity (positive/negative) the same way that e.g. java has double.POSITIVE_INFINITY if I remember correctly? What are the semantics for this?

  2. bernhard

    There are no special values for infinities, NaN, or other non-numerics. The closest thing is maxBound which gives you the maximum value for a bounded numeric type.