Choosing the easier to read periodic boundary condition. The reason why it is faster is because of vec3 was double