public static CCPoint Normalize(CCPoint v) { return(v.Mult(1f / Length(v))); }
public static CCPoint Lerp(CCPoint a, CCPoint b, float alpha) { return(a.Mult(1f - alpha).Add(b.Mult(alpha))); }
/// <summary> /// Returns the projection of this over v2. /// </summary> /// <param name="v2"></param> /// <returns></returns> public CCPoint Project(CCPoint v2) { return(v2.Mult(Dot(v2) / v2.Dot(v2))); }