CSG.Vector4D.Lerped C# (CSharp) Method

Lerped() public method

public Lerped ( Vector4D dest, float t ) : Vector4D
dest Vector4D
t float
return Vector4D
        public Vector4D Lerped(Vector4D dest, float t)
        {
            return new Vector4D(this).AddedWith(dest.SubtractedBy (this).MultipliedBy (t));
        }

Usage Example

Example #1
0
 public Vertex Lerped(Vertex dest, float t, Vertex outVertex)
 {
     outVertex.Position = Position.Lerped(dest.Position, t, outVertex.Position);
     outVertex.Normal   = Normal.Lerped(dest.Normal, t, outVertex.Normal);
     outVertex.Tangent  = Tangent.Lerped(dest.Tangent, t, outVertex.Tangent);
     outVertex.UV1      = UV1.Lerped(dest.UV1, t, outVertex.UV1);
     outVertex.UV2      = UV2.Lerped(dest.UV2, t, outVertex.UV2);
     outVertex.Color    = Color.Lerped(dest.Color, t, outVertex.Color);
     return(outVertex);
 }