diff --git a/src/includes/atom.h b/src/includes/atom.h index abc425e..e090936 100644 --- a/src/includes/atom.h +++ b/src/includes/atom.h @@ -37,15 +37,15 @@ extern void createAtom(Atom*, Parameter*); extern void growAtom(Atom*); #ifdef AOS -#define POS_DATA_LAYOUT "AoS" -#define atom_x(i) atom->x[i * 3 + 0] -#define atom_y(i) atom->x[i * 3 + 1] -#define atom_z(i) atom->x[i * 3 + 2] +#define POS_DATA_LAYOUT "AoS" +#define atom_x(i) atom->x[(i) * 3 + 0] +#define atom_y(i) atom->x[(i) * 3 + 1] +#define atom_z(i) atom->x[(i) * 3 + 2] #else -#define POS_DATA_LAYOUT "SoA" -#define atom_x(i) atom->x[i] -#define atom_y(i) atom->y[i] -#define atom_z(i) atom->z[i] +#define POS_DATA_LAYOUT "SoA" +#define atom_x(i) atom->x[i] +#define atom_y(i) atom->y[i] +#define atom_z(i) atom->z[i] #endif #endif