com.teamwizardry.librarianlib.math.SimpleAnimation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core classes used by the other LibrarianLib modules
package com.teamwizardry.librarianlib.math
import com.teamwizardry.librarianlib.core.util.lerp.Lerper
public class SimpleAnimation(
private val lerper: Lerper,
public val from: T,
public val to: T,
duration: Float,
public val easing: Easing
): BasicAnimation(duration) {
override fun getValueAt(time: Float, loopCount: Int): T {
return lerper.lerp(from, to, easing.ease(time))
}
}