Add airdodge

This commit is contained in:
2026-08-26 22:04:41 +02:00
parent d9222409ce
commit e7e744f15e
12 changed files with 137 additions and 5 deletions
+19 -1
View File
@@ -2,7 +2,7 @@ use bevy::math::Vec2;
use bevy::prelude::*;
use fixed::types::I32F32;
use serde::{Deserialize, Serialize};
use std::ops::{Add, AddAssign, Div, Mul, Sub};
use std::ops::{Add, AddAssign, Div, Mul, MulAssign, Sub};
use super::int::{FGWide, FGi32};
@@ -221,6 +221,24 @@ impl AddAssign for FGVec2 {
}
}
impl MulAssign for FGVec2 {
fn mul_assign(&mut self, rhs: Self) {
*self = Self {
x: self.x * rhs.x,
y: self.y * rhs.y,
}
}
}
impl MulAssign<FGi32> for FGVec2 {
fn mul_assign(&mut self, rhs: FGi32) {
*self = Self {
x: self.x * rhs,
y: self.y * rhs,
}
}
}
#[cfg(test)]
mod is_normalized_tests {
use super::*;