formZ SDK | 5.0 API Reference | System | Math

# fz_math_2d_create_unit_vec

Description

Creates a unit length 2d vector from two 2d points.

Plugin Prototype

fzrt_error_td fz_math_2d_create_unit_vec(

fz_xy_td * | pt1,
fz_xy_td * | pt2,
fz_xy_td * | unit_vec )

Parameters

pt1 [Input]

2d point 1

pt2 [Input]

2d point 2

unit_vec [Result]

unit length 2d vector

Returns

Error codes
FZ_MATH_ERR_ZERO_LEN_VEC - the two 2d points are equal

Availability

5.0.0.0

Example Files

util_math_2d.fsl

See Also

fz_math_3d_create_unit_vec

Function Set

fz_math_fset

Defined in

fz_math_api.h