/// <summary> /// Calculates the angle between the specified points. /// </summary> /// <param name="center">The center of the angle.</param> /// <param name="start">The start of the angle.</param> /// <param name="end">The end of the angle.</param> /// <returns>The angle, in degrees.</returns> public static double Angle(this ColorSpacePoint center, ColorSpacePoint start, ColorSpacePoint end) { Vector3 first = start.ToVector3() - center.ToVector3(); Vector3 second = end.ToVector3() - center.ToVector3(); return(Vector3.Angle(first, second)); }
/// <summary> /// Calculates the angle between the specified points. /// </summary> /// <param name="center">The center of the angle.</param> /// <param name="start">The start of the angle.</param> /// <param name="end">The end of the angle.</param> /// <returns>The angle, in degrees.</returns> public static double AngleBetween(this ColorSpacePoint center, ColorSpacePoint start, ColorSpacePoint end) { Vector3 first = start.ToVector3() - center.ToVector3(); Vector3 second = end.ToVector3() - center.ToVector3(); return Vector3.AngleBetween(first, second); }
/// <summary> /// Calculates the angle and updates the arc according to the specifed points. /// </summary> /// <param name="start">The starting point.</param> /// <param name="middle">The middle point.</param> /// <param name="end">The end point.</param> /// <param name="desiredRadius">The desired arc radius.</param> public void Update(ColorSpacePoint start, ColorSpacePoint middle, ColorSpacePoint end, double desiredRadius = 0) { Update(start.ToVector3(), middle.ToVector3(), end.ToVector3(), desiredRadius); }