public static Float3 LerpClamp(Float3 a_, Float3 b_, float p_, float t_) { var f = GenericMath.Clamp(p_ / t_, 0, 1); var k = 1 - f; return(new Float3(a_.x * k + b_.x * f, a_.y * k + b_.y * f, a_.z * k + b_.z * f)); }
public static Float2 LerpClamp(Float2 a_, Float2 b_, float p_, float t_) { var f = GenericMath.Clamp(p_ / t_, 0, 1); return(new Float2(a_.x * (1 - f) + b_.x * f, a_.y * (1 - f) + b_.y * f)); }
public static Int3 LerpClamp(Int3 a_, Int3 b_, N2 p_, N2 t_) => Lerp(a_, b_, GenericMath.Clamp(p_, 0, t_), t_);