Skip to main content

fennel_physics/
gravity.rs

1/// A struct representing gravity
2#[derive(Debug)]
3pub struct Gravity {
4    pub(crate) acceleration: f32,
5}
6
7impl Gravity {
8    /// Create a new [`Gravity`] instance
9    ///
10    /// # Arguments
11    /// * `acceleration`: floating-point value of the acceleration
12    pub fn new(acceleration: f32) -> Self {
13        Self {
14            acceleration,
15        }
16    }
17}