LVector2f

class LVector2f

Bases: LVecBase2f

This is a two-component vector offset.

Inheritance diagram

Inheritance diagram of LVector2f

LVector2f(void) = default
LVector2f(LVecBase2f const &copy)
LVector2f(float fill_value)
LVector2f(float x, float y)
LVector2f(LVector2f const&) = default

Constructs a new LVector2 from a LVecBase2

Constructs a new LVector2 with all components set to the fill value.

static TypeHandle get_class_type(void)
LVector2f normalized(void) const

Normalizes the vector and returns the normalized vector as a copy. If the vector was a zero-length vector, a zero length vector will be returned.

LVector2f project(LVecBase2f const &onto) const

Returns a new vector representing the projection of this vector onto another one. The resulting vector will be a scalar multiple of onto.

float signed_angle_deg(LVector2f const &other) const

returns the signed angled between two vectors. normalization is NOT necessary

float signed_angle_rad(LVector2f const &other) const

returns the signed angled between two vectors. normalization is NOT necessary

LVector2f const &unit_x(void)

Returns a unit X vector.

LVector2f const &unit_y(void)

Returns a unit Y vector.

LVector2f const &zero(void)

Returns a zero-length vector.