formZ SDK | 5.0 API Reference | System | Math
Description
Given a 2d line defined by two 2d points (_p1 and _p2), checks whether a 2d point (_pt)
is on the left or right side of the line, looking from _p1 to _p2.
Note : this macro does not determine if a point is on the line.
Points exactly on the line or very close to the line are subject to
mathematical accuracy errors.
Plugin Prototype
#define FZ_MATH_2D_PT_SIDE_OF_LINE( _p1, _p2, _pt)
Parameters
fz_xy_td * _p1 [Input]
2d point 1 of line definition.
fz_xy_td * _p2 [Input]
2d point 2 of line definition.
fz_xy_td * _pt [Input]
2d point to check which side of the line it is on.
Returns
-1 if on the left side, 1 if on the right side
Return Type: fzrt_int
Availability
5.0.0.0
See Also
FZ_MATH_2D_VEC_LEN_SQUARED, FZ_MATH_2D_DIST_PT_PT_SQUARED, FZ_MATH_2D_PT_PT_DIST, FZ_MATH_2D_IS_EQUAL_PTS, FZ_MATH_2D_DOT_PROD, FZ_MATH_2D_CREATE_VEC, FZ_MATH_2D_SCALE_XY, FZ_MATH_2D_ADD_XY, FZ_MATH_2D_MID_PT, FZ_MATH_2D_INTERP_X, FZ_MATH_2D_INTERP_Y, FZ_MATH_2D_AREA_OF_3_PTS
Defined in