SmoothAngle::new

This commit is contained in:
Dmitry Stepanov
2025-02-22 21:03:56 +03:00
parent 8a5cf87734
commit fe687c8a0e
+9
View File
@@ -620,6 +620,15 @@ pub struct SmoothAngle {
}
impl SmoothAngle {
#[inline]
pub fn new(angle: f32, speed: f32) -> Self {
Self {
angle,
target: angle,
speed,
}
}
#[inline]
pub fn set_target(&mut self, angle: f32) -> &mut Self {
self.target = angle;