formZ SDK | 5.0 API Reference | System | Math

# fz_math_2d_interp_pt_on_line

Description

Given a 2d line segment (defined by it's start and end points) and a ratio (between 0.0 and 1.0), interpolates a 2d point on the line segment.
For example:
ratio 0.0 : point is at line_start
ratio 0.5 : point is the midpoint of the line segment
ratio 1.0 : point is at line_end

Plugin Prototype

fzrt_error_td fz_math_2d_interp_pt_on_line(

fz_xy_td * | line_start,
fz_xy_td * | line_end,
double | ratio,
fz_xy_td * | pt )

Parameters

line_start [Input]

start point of 2d line segment

line_end [Input]

end point of 2d line segment

ratio [Input]

ratio

Range: 0.0 <= ratio <= 1.0

pt [Result]

interpolated 2d point

Returns

Error codes

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

Function Set

fz_math_fset

Defined in

fz_math_api.h