graphene
graphene copied to clipboard
box: Use isinf() and signbit() when isinff() is not available
trafficstars
Instead of using bytewise comparison, use isinf() and hope it works correctly with single precision floats on the target platform; additionally, since the negative return value for negative infinities is a GNU extension, use signbit() to check if the number is a positive or negative infinity.
Proposed changes:
- change the fallback path for the
is_empty()andis_infinity()methods ofgraphene_box_t