func CannonX(initial float32, rate float32, elap time.Duration) (float32, float32) {
	x := initial + rate*float32(elap)/float32(time.Second)
	switch {
	case x < 0:
		x = -x
		rate = -rate
	case x > 1:
		x = 2 - x
		rate = -rate
	}
	return x, rate
}
CannonX calculates new value after elap delta time interval. 0.0 to 1.0
package future
import (
	"time"
)
const FuelRechargeRate = float32(1.0 / 3.0)  
func Fuel(initial float32, elap time.Duration) float32 {
	fuel := initial + FuelRechargeRate*float32(elap)/float32(time.Second)
	if fuel > 10 {
		fuel = 10
	}
	return fuel
}