make speed increas exponentially

This commit is contained in:
Franz Dietrich 2025-10-24 16:31:43 +02:00
parent ea5bb85e88
commit 73d0ef4881

View File

@ -330,7 +330,12 @@ impl TweenController {
current: &Turtle, current: &Turtle,
speed: AnimationSpeed, speed: AnimationSpeed,
) -> f64 { ) -> f64 {
let speed = speed.value(); let mut speed = speed.value();
// For high speeds, make animation even faster by scaling speed exponentially
if speed > 100.0 {
speed *= speed / 100.0;
}
let base_time = match command { let base_time = match command {
TurtleCommand::Move(dist) => dist.abs() / speed, TurtleCommand::Move(dist) => dist.abs() / speed,