mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
SmoothAngle::new
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user