comp-b-cw1/Particle.h
2023-02-20 20:46:41 +00:00

15 lines
324 B
C++

#pragma once
#include <array>
class Particle {
public:
static const int dim = 2; // we are in two dimensions
std::array<double, dim> pos{};
// constructor, with a specified initial pos
explicit Particle(std::array<double, dim> pos) {
this->pos[0] = pos[0];
this->pos[1] = pos[1];
}
};