/// <summary> /// Initializes a new instance of the SharpDX.AngleSingle structure with the /// given unit dependant angle and unit type. /// </summary> /// <param name="angle">A unit dependant measure of the angle.</param> /// <param name="type">The type of unit the angle argument is.</param> public AngleSingle(float angle, AngleType type) { radiansInt = 0; switch (type) { case AngleType.Revolution: radians = MathUtil.RevolutionsToRadians(angle); break; case AngleType.Degree: radians = MathUtil.DegreesToRadians(angle); break; case AngleType.Radian: radians = angle; break; case AngleType.Gradian: radians = MathUtil.GradiansToRadians(angle); break; default: radians = 0.0f; break; } }