Verified Commit 9ec1e98d authored by betseg's avatar betseg 🏳🌈

const

parent 0d2238eb
......@@ -10,11 +10,11 @@ pub struct Entity {
}
impl Entity {
pub fn new(texture: Texture, position: Vec2<f32>) -> Self {
Self::with_velocity(texture, position, Vec2::zero())
pub const fn new(texture: Texture, position: Vec2<f32>) -> Self {
Self::with_velocity(texture, position, Vec2 { x: 0., y: 0. })
}
pub fn with_velocity(texture: Texture, position: Vec2<f32>, velocity: Vec2<f32>) -> Self {
pub const fn with_velocity(texture: Texture, position: Vec2<f32>, velocity: Vec2<f32>) -> Self {
Self {
texture,
position,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment