I can work around it, but an amendment to the online documentation would have saved me a good amount of time and may save someone the same in the future.
There is a variable 'hspd' which tracks the character's horizontal speed. Positive is right, negative is left. It increments by multiples of 0.1.
It appears that when 0.10 hits zero, it actually becomes -0.00 for the remainder of the step event. Negative hitting zero yields a positive 0.00. This is later 'cleaned up'.
You can probably see the problem. When evaluating sign(hspd) during the same event, it returns -1 rather than 0, because it does not treat -0.00 as a 0 despite being listed as a Real Number function.
This function should only be used in conjunction with known non-zero values. Throwing Reals and negative zeroes at it are guaranteed headaches. Is there any chance at making a slight amendment to the following online resource?
https://docs.yoyogames.com/index.html?page=source/dadiospice/002_reference/maths/real valued functions/sign.html
There is a variable 'hspd' which tracks the character's horizontal speed. Positive is right, negative is left. It increments by multiples of 0.1.
It appears that when 0.10 hits zero, it actually becomes -0.00 for the remainder of the step event. Negative hitting zero yields a positive 0.00. This is later 'cleaned up'.
You can probably see the problem. When evaluating sign(hspd) during the same event, it returns -1 rather than 0, because it does not treat -0.00 as a 0 despite being listed as a Real Number function.
This function should only be used in conjunction with known non-zero values. Throwing Reals and negative zeroes at it are guaranteed headaches. Is there any chance at making a slight amendment to the following online resource?
https://docs.yoyogames.com/index.html?page=source/dadiospice/002_reference/maths/real valued functions/sign.html