fennel-physics 0.1.0

Physics engine for the Fennel game engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// A struct representing gravity
#[derive(Debug)]
pub struct Gravity {
    pub(crate) acceleration: f32,
}

impl Gravity {
    /// Create a new [`Gravity`] instance
    ///
    /// # Arguments
    /// * `acceleration`: floating-point value of the acceleration
    pub fn new(acceleration: f32) -> Self {
        Self {
            acceleration,
        }
    }
}