formZ SDK | 5.0 API Reference | System | Math

# fz_math_2d_angle_of_2_lines

Description

Given an angle defined by three 2d points (pt1, center, pt2), calculates the degrees of the angle.
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_angle_of_2_lines(

fz_xy_td * | pt1,
fz_xy_td * | center,
fz_xy_td * | pt2,
double * | angle )

Parameters

pt1 [Input]

2d point 1

center [Input]

apex of angle

pt2 [Input]

2d point 2

angle [Result]

angle

Returns

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

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

fz_math_3d_angle_of_2_lines

Function Set

fz_math_fset

Defined in

fz_math_api.h