float x,y in struct Particle?

  • QuanTech
    12th Feb 2017 Member 0 Permalink

    In struct ParticleI've noticed two members:float x,yWhat do they represent? I don't think they are the x and y coords of the particle because it uses float

  • jombo23
    12th Feb 2017 Member 0 Permalink

    Yes particles' locations are float

  • QuanTech
    12th Feb 2017 Member 0 Permalink

    @jombo23 (View Post)

     Hmm ok that's a bit weird.

  • jacob1
    12th Feb 2017 Developer 0 Permalink
    If they weren't floats, basic stuff like velocity couldn't work. Unless velocity was also integers, but then movement would look very bad. Even though particles are all rounded to integer locations for display / collision, they really have float positions and velocities.