I know of these values:
CGFloat.infinity
, which is greater thanCGFloat.greatestFiniteMagnitude
, which is greater thanCGFloat.leastNormalMagnitude
, which is greater thanCGFloat.leastNonzeroMagnitude
, which is greater than0
but it stops there... as far as I can tell. Where are the negative values? I imagine maybe it's as easy as placing a -
before them, but then I worry that there might be strange exceptions.
How do I find the key negative numbers in CGFloat? Critically, the lowest negative non-infinite number.
Floating point numbers have a sign bit and negating them changes this sign bit to the opposite value (there is actually a negative zero).
Just put a minus before them. The negation is well defined.