isStraight

fun isStraight(tolerance: Double = 0.01): Boolean(source)

Determines if the Segment2D forms a straight line.

If the given Segment2D has control points, the function verifies that they do not add any curvature to the path.

Parameters

tolerance

The margin of error for what's considered a straight line.