I'm making a game about colors, and recently ran into a simple problem. When the player collides with a block, the players speed increases based on how red the block is. I have a variable called red, which is between 0 and 1, a predefined variable called normalSpeed and maxSpeed, and one called speed. speed should be between normalSpeed and maxSpeed based on the red. if red = 1, speed would equal maxSpeed. What's an equation to do this? Thanks.
2026-04-01 11:15:29.1775042129
How to find a number between two numbers based on a proportion.
110 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
speed = normal speed + red (maxspeed - normal speed )
when red is $0$, speed = normal speed.
when red is $1$, speed = max speed.
if red is in between $0$ and $1$, you obtain something in between.