Particle

File: samarium/physics/Particle.hpp

namespace sm
template<typename Float = f64>
struct Particle

Public Functions

inline constexpr auto as_circle() const noexcept
inline constexpr auto apply_force(Vector2_t<Float> force) noexcept
inline constexpr auto update(Float time_delta = 1.0 / 64) noexcept
constexpr bool operator==(const Particle&) const = default

Public Members

Vector2_t<Float> pos = {}
Vector2_t<Float> vel = {}
Vector2_t<Float> acc = {}
Float radius = {1}
Float mass = {1}