MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / new

Method new

src/animation/mod.rs:21–30  ·  view source on GitHub ↗
(start: f32, end: f32, duration: Duration)

Source from the content-addressed store, hash-verified

19
20impl Animation {
21 pub fn new(start: f32, end: f32, duration: Duration) -> Self {
22 Self {
23 duration,
24 easing: EasingFunction::Linear,
25 start_value: start,
26 end_value: end,
27 current_value: start,
28 progress: 0.0,
29 }
30 }
31
32 pub fn with_easing(mut self, easing: EasingFunction) -> Self {
33 self.easing = easing;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected