#how do i get seconds as f32 from u64 nanoseconds

1 messages · Page 1 of 1 (latest)

late fulcrum
#

Im trying to get a deltaTime from my loop, but i can't seem to find a solution that the compiler likes as it complains about finding f64 on the division?
Is it that i can only use division with f32?

carmine fractal
#

@as is doing the same as a simple type inference, but explicitly. For casting, you should use @floatCast or @intCast

late fulcrum
#

welp that fixed it! can't believe i overlooked @floatCast

#

Thank you!