15 lines
324 B
C++
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];
|
|
}
|
|
};
|