API Documentation > CorelDRAW > 2025-v26
MathUtils class
MathUtils class
Syntax:
Class MathUtils
Methods:
Name Description
ClosestPointToInfiniteLine Find the closest point to an infinite line segment
ClosestPointToLineSegment Find the closest point to a line segment, returns the closest endpoint if none are found
CreateIdentityTransformMatrix Create an identity transform matrix
CreateLineSegmentTransformMatrix Create a transform matrix that when applied to 'from' will result in 'to'
CreatePoint Create a point
CreatePointRange Create a point range
CreateRotationTransformMatrix Create a rotation transform matrix
CreateScaleTransformMatrix Create a scale transform matrix
CreateTranslationTransformMatrix Create a translation transform matrix
CreateVector Create a vector
DistanceToInfiniteLine Find the distance to an infinite line
DistanceToLineSegment Find the distance to a line segment, returns the distance to the closest endpoint if none are found
FitLineToPoints Fits a line to an array of points
GetRandomInteger Gets a random integer between low and high
GetRandomReal Gets a random double between low and high
Interpolate Interpolates between two points
IntersectInfiniteLines Find the intersection between two infinite lines
IntersectLineSegments Find the intersection between two line segments
MidPoint Returns the midpoint of two points