formZ SDK | 5.0 API Reference | System | Math

fz_math_2d_bisect_angle

Description

Calculates the 2d bisect vector of an angle defined by three 2d points (pt1, center, pt2).
center is the apex of the angle formed by the 2d vectors (center, pt1) and (center, pt2).

Plugin Prototype

fzrt_error_td fz_math_2d_bisect_angle(

fz_xy_td *

pt1,

fz_xy_td *

center,

fz_xy_td *

pt2,

fz_xy_td *

bisect_vec )

Parameters

pt1 [Input]

2d point 1

center [Input]

apex of the angle

pt2 [Input]

2d point 2

bisect_vec [Result]

2d bisect vector

Returns

Error codes
FZ_MATH_ERR_ZERO_LEN_VEC - lines from pt1 to center or center to pt2 are zero length
FZ_MATH_ERR_VEC_PARALLEL - pt1, center, pt2 are colinear

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

fz_math_3d_bisect_angle

Function Set

fz_math_fset


Defined in

fz_math_api.h