Skip to main content

time_handles_valid

Function time_handles_valid 

Source
pub fn time_handles_valid(x1: f32, x2: f32) -> bool
Expand description

Whether a cubic from time 0 to 1 with inner time coordinates x1, x2 never runs backwards.

That is x1 >= 0, x2 <= 1, and x2 >= x1 or (x1 - x2)^2 <= x1 * (1 - x2).