Skip to main content
Participant
Jul 14, 2014 10:17 AM UTC
Question

Is Point.interpolate deterministic?

Hi,

I am currently developing a truly deterministic ballistic engine, and so far I am doing good, I avoid numbers/floats and Math.cos/sin. But now I would like to interpolate between my points, and it would be easy for me to use the Point.interpolate method. Is this method truly cross platform/CPU deterministic?

My points contain integers, I don´t mind getting float/number results, as long as they are deterministic.

Thanks, Brian

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
Jul 14, 2014 6:53 PM UTC

Well Point.interpolate is going to be performing floating point math, so it'll be as deterministic as that. I'm not familiar enough with the imprecision issues of floating point math but I would think that if you start with integers, you'll always get a result that would round to the same resulting integer... but again I'm not sure.

Point.interpoloate is just the same as:

p = p1 + (p2 - p1) * n;

-Aaron

Translate