Class MathExtensions
- Namespace
- Icy.Data
- Assembly
- IcyUI.dll
Provides utility extensions for the mathematical objects such as vectors, quaternions etc.
public static class MathExtensions
- Inheritance
-
MathExtensions
- Inherited Members
Methods
AsPoint(Size)
Gets the point representation of the specified Size instance.
public static Point AsPoint(this Size size)
Parameters
Returns
- Point
Point representation of the specified size.
AsPoint(SizeF)
Gets the point representation of the specified SizeF instance.
public static PointF AsPoint(this SizeF size)
Parameters
Returns
- PointF
Point representation of the specified size.
AsVector(Size)
Gets the vector representation of the specified Size instance.
public static Vector2 AsVector(this Size size)
Parameters
Returns
- Vector2
Vector representation of the specified size.
AsVector(SizeF)
Gets the vector representation of the specified SizeF instance.
public static Vector2 AsVector(this SizeF size)
Parameters
Returns
- Vector2
Vector representation of the specified size.
Center(Rectangle)
Gets the location of the middle point of the specified rectangle.
public static Point Center(this Rectangle rect)
Parameters
Returns
Remarks
If the middle point is not placed on an integer coordinate, it will be rounded with default rounding rules.
Max(Size, Size)
Gets the smallest size that contains both sizes: the larger width and the larger height.
public static Size Max(this Size left, Size right)
Parameters
Returns
- Size
A size whose width and height are each the larger of the two.
ToYawPitchRoll(Quaternion)
Gets the yaw-pitch-roll Vector3 from the given Quaternion.
public static Vector3 ToYawPitchRoll(this Quaternion q)
Parameters
qQuaternionA Quaternion to get Euler angles for.
Returns
- Vector3
One of the possible rotation Euler angles in radians for the specified quaternion.