Log In  
Follow
reapersanta

(he/himst) miles
developing a game called

bugged

[ :: Read More :: ]

Hi Guys, i found a bug? not sure if this -0 (negative zero) is a feature or somewhat useful on other scenarios, kindly try out this code

x = 1
t = -100
function _update()
    cls(13)
    t*=0.5
    color(7)
    print("x+t:"..x+t)
    print("x:"..x)
    print("t:"..t)
    circfill(60,10,5,x+t)
    circfill(60,30,5,x)
end

im using t to animate colors or sprites but i noticed that when t is approaching to 0 from a negative value, it stays negative even tho its 0, and i thought, "of course it does not matter because it's still zero" but it does matter because somehow it's 1 off to 0, at least that's what i think happens base on the colors

im doing a workaround where i check if it's less than 0 and set it to 0. but it costs tokens :<<< i hope this gets resolved. thanks

P#142364 2024-03-03 19:01 ( Edited 2024-03-03 19:02)