pub const fn linear<const N: usize>(
start_degrees: u16,
end_degrees: u16,
total_duration: Duration,
) -> [(u16, Duration); N]Available on
target_os=none only.Expand description
Build a const linear sequence of animation steps as an array.
Returns a fixed-size array with N steps interpolating linearly from start_degrees to
end_degrees over total_duration. Can be used in const contexts.
See the servo_player module documentation for usage.
§Parameters
N— Number of steps in the sequence (const generic parameter)start_degrees— Starting angle in degreesend_degrees— Ending angle in degreestotal_duration— Total time for the entire sequence