formZ SDK | 5.0 API Reference | System | Math

# fz_math_2d_equs_from_circle_tang

Description

Given a circle (defined by a center and radius) and a 2d point, calculates the 2d tangent line equations (defined by it's slope and offset).
n_lines indicates whether there are 0, 1 or 2 solutions.
line_equs_a and line_equs_c are arrays that return the slopes and offsets of 2d line equation(s) respectively. They must be able to hold two entities each.
0 solutions : point is inside circle
1 solution : point is on circle
2 solutions : point is outside circle

Plugin Prototype

fzrt_error_td fz_math_2d_equs_from_circle_tang(

fz_xy_td * | center,
double | radius,
fz_xy_td * | pt,
double | line_equs_a[2],
double | line_equs_c[2],
fzrt_int * | n_lines )

Parameters

center [Input]

center of circle

radius [Input]

radius of circle

pt [Input]

point

line_equs_a[2] [Result]

slope of 2d tangent line equation(s)

line_equs_c[2] [Result]

offset of 2d tangent line equation(s)

n_lines [Result]

number of 2d tangent lines

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

fz_math_2d_center_3pt_circle,

Function Set

fz_math_fset

Defined in

fz_math_api.h