graphene icon indicating copy to clipboard operation
graphene copied to clipboard

box: Use isinf() and signbit() when isinff() is not available

Open ebassi opened this issue 5 years ago • 0 comments
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() and is_infinity() methods of graphene_box_t

ebassi avatar Jun 18 '20 11:06 ebassi