formZ SDK | 5.0 API Reference | System | Math

fz_math_2d_equ_from_line_seg

Description

Given a 2d line segment (defined by it's start and end points), calculates the 2d line equation (defined by it's slope and offset).
The optional kase parameter returns whether the line is horizontal (1), vertical (2) or at an arbitrary angle (0).

Plugin Prototype

fzrt_error_td fz_math_2d_equ_from_line_seg(

fz_xy_td *

line_seg_start,

fz_xy_td *

line_seg_end,

double *

line_equ_a,

double *

line_equ_c,

fzrt_int *

kase )

Parameters

line_seg_start [Input]

start point of 2d line segment

line_seg_end [Input]

end point of 2d line segment

line_equ_a [Result]

slope of 2d line equation

line_equ_c [Result]

offset of 2d line equation

kase [Result, Optional]

information about the line

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

fz_math_2d_line_seg_from_equ

Function Set

fz_math_fset


Defined in

fz_math_api.h