Ejemplo n.º 1
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by the vector amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector2d LinearInterpolate(Vector2d to, Vector2d weight)
 {
     return(new Vector2d
            (
                Mathd.Lerp(x, to.x, weight.x),
                Mathd.Lerp(y, to.y, weight.y)
            ));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector2d Lerp(Vector2d to, double weight)
 {
     return(new Vector2d
            (
                Mathd.Lerp(x, to.x, weight),
                Mathd.Lerp(y, to.y, weight)
            ));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by the vector amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector3d LinearInterpolate(Vector3d to, Vector3d weight)
 {
     return(new Vector3d
            (
                Mathd.Lerp(x, to.x, weight.x),
                Mathd.Lerp(y, to.y, weight.y),
                Mathd.Lerp(z, to.z, weight.z)
            ));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector3d LinearInterpolate(Vector3d to, double weight)
 {
     return(new Vector3d
            (
                Mathd.Lerp(x, to.x, weight),
                Mathd.Lerp(y, to.y, weight),
                Mathd.Lerp(z, to.z, weight)
            ));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by the vector amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A vector with components on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector4d Lerp(Vector4d to, Vector4d weight)
 {
     return(new Vector4d
            (
                Mathd.Lerp(x, to.x, weight.x),
                Mathd.Lerp(y, to.y, weight.y),
                Mathd.Lerp(z, to.z, weight.z),
                Mathd.Lerp(w, to.w, weight.w)
            ));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Returns the result of the linear interpolation between
 /// this vector and `to` by amount `weight`.
 /// </summary>
 /// <param name="to">The destination vector for interpolation.</param>
 /// <param name="weight">A value on the range of 0.0 to 1.0, representing the amount of interpolation.</param>
 /// <returns>The resulting vector of the interpolation.</returns>
 public Vector4d Lerp(Vector4d to, double weight)
 {
     return(new Vector4d
            (
                Mathd.Lerp(x, to.x, weight),
                Mathd.Lerp(y, to.y, weight),
                Mathd.Lerp(z, to.z, weight),
                Mathd.Lerp(w, to.w, weight)
            ));
 }