Maths.h bug, missing parens

SGDK only sub forum

Moderator: Stef

Post Reply
cero
Very interested
Posts: 338
Joined: Mon Nov 30, 2015 1:55 pm

Maths.h bug, missing parens

Post by cero » Wed Feb 17, 2016 9:47 am

The min, max, and abs macros need total parens outside the expression, otherwise they're buggy.

For example:
if (abs(a) >= 512)

This produces wrong results with the current macros.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Maths.h bug, missing parens

Post by Stef » Wed Feb 17, 2016 1:01 pm

indeed, thanks for pointing that !

Post Reply