Example #1
0
 public bool Equals(Vector2WithUV other)
 {
     return(Vector == other.Vector && UV == other.UV);
 }
Example #2
0
        /// <summary>
        /// Average with another <see cref="Vector2WithUV"/>.
        /// </summary>
        /// <param name="other">The other <see cref="Vector2WithUV"/></param>
        /// <param name="fractionOfOther">The weight of the other vector in this average.</param>
        public Vector2WithUV AverageWith(Vector2WithUV other, float fractionOfOther)
        {
            float fractionOfThis = 1f - fractionOfOther;

            return(new Vector2WithUV(fractionOfThis * Vector + fractionOfOther * other.Vector, fractionOfThis * UV + fractionOfOther * other.UV));
        }