/// <summary> /// Sets the X and Y components of this vector. /// </summary> public void SetComponents(Double x, Double y) { m_componentX = x; m_componentY = y; m_magnitude = Math2d.ComputeVectorMagnitude(x, y); m_angleInRadians = Math2d.ComputeVectorAngleR(x, y); }
/// <summary> /// Sets the magnitude and angle of this vector. /// </summary> public void SetMagAndAngleR(Double mag, Double angleInRadians) { m_magnitude = mag; m_angleInRadians = angleInRadians; Math2d.ComputeVectorComponents(mag, angleInRadians, out m_componentX, out m_componentY); }