I'm working on a particle engine, in Eclipse on Windows 7, and I have a problem I've never seen before. I have this in my code:
float start = startPosition.getY();
p.position.addTo(p.moveVector);
float end = startPosition.getY();
if(start != end){
System.out.println("hit");
}
And it does print hit quite often. The reason I did this was because startPosition was being changed and it was messing up my program.
I also went into the debugger and looked at the values when it printer hit, and I got this for end, all variables in position and moveVector: 1.0E-5 I have no idea what to make of that.
Here is my code.
Particle Emitter http://tinyurl.com/9ahwodx
Particle http://tinyurl.com/8rw979d
Vector 3f http://tinyurl.com/9do6v2k
The code in question is at the bottom of ParticleEmitter.
If you want to see or know anything else let me know, but I think that's all the relevant info.