organização de código

This commit is contained in:
silva guimaraes 2025-01-28 08:23:02 -03:00
parent 277c6d070a
commit a411573a06
5 changed files with 529 additions and 266 deletions

21
ease.go Normal file
View file

@ -0,0 +1,21 @@
package main
import (
"math"
)
func easeInOutCubic(x float32) float32 {
if x < 0.5 {
return 4 * x * x * x
} else {
return 1 - float32(math.Pow(float64(-2*x+2), 3))/2
}
}
func lerp(v0, v1, t float32) float32 {
return (1-t)*v0 + t*v1
}
func easeInOutSine(x float32) float32 {
return -float32(math.Cos(math.Pi*float64(x))-1) / 2
}