public static Complex Divide(ref Complex left, ref Complex right) { return(new Complex(right.Real * left.Real + right.Imaginary * left.Imaginary, right.Real * left.Imaginary - right.Imaginary * left.Real)); }
public static Complex Normalize(ref Complex value) { var mag = value.Magnitude; return(new Complex(value.Real / mag, -value.Imaginary / mag)); }
public static Complex Multiply(ref Complex left, ref Complex right) { return(new Complex(left.Real * right.Real - left.Imaginary * right.Imaginary, left.Imaginary * right.Real + left.Real * right.Imaginary)); }
public static Complex Negate(ref Complex value) { return(new Complex(-value.Real, -value.Real)); }
public static Complex Conjugate(ref Complex value) { return(new Complex(value.Real, -value.Imaginary)); }
public static void Divide(Vector2 left, ref Complex right, out Vector2 result) { result = new Vector2(left.X * right.Real + left.Y * right.Imaginary, left.Y * right.Real - left.X * right.Imaginary); }
public static Vector2 Divide(Vector2 left, ref Complex right) { return(new Vector2(left.X * right.Real + left.Y * right.Imaginary, left.Y * right.Real - left.X * right.Imaginary)); }
public static void Divide(ref Complex left, ref Complex right, out Complex result) { result = new Complex(right.Real * left.Real + right.Imaginary * left.Imaginary, right.Real * left.Imaginary - right.Imaginary * left.Real); }