Not logged inOpenClonk Forum
Up Topic Floating-point math, redux

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Caesar

>and some weird interactions in C4Movement,


I think I had that fixed. Still, the idea that precision might affect objects in different positions in the landscape differently scared me.

What I had implemented back then with floats was approx 1c, I think, and it didn't cause too many problems, even though I also had many functions like getting positions and rotations return floats. The only real bug I found was that you couldn't turn left on the boompack anymore because of a rounding error.
I also tried to have Sin(float) -> float, Sin(int, int, int) -> int, Sin(float, …) -> error, and similar, but these kind of things get awkward quickly. I would not recommend that, but I don't have a much better idea either…

(I'd be a fan of 1a if c4script were statically typed. I don't really have a preference.)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill