mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fix SGN macro
This version behaves the way the documentation states: 0 values will resolve to 0 instead of +1
This commit is contained in:
parent
ed2f84735b
commit
3347cc25b8
@ -92,7 +92,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SGN
|
#ifndef SGN
|
||||||
#define SGN(m_v) (((m_v) < 0) ? (-1.0) : (+1.0))
|
#define SGN(m_v) (((m_v) == 0) ? (0.0) : (((m_v) < 0) ? (-1.0) : (+1.0)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
|
Loading…
Reference in New Issue
Block a user