panda3d.core.LVector2d

class LVector2d

Bases: LVecBase2d

This is a two-component vector offset.

Inheritance diagram

Inheritance diagram of LVector2d

__init__() → None
__init__(copy: LVecBase2d) → None

Constructs a new LVector2 from a LVecBase2

__init__(param0: LVector2d) → None
__init__(fill_value: float) → None

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

__init__(x: float, y: float) → None
static getClassType() → TypeHandle
Return type

TypeHandle

normalized() → LVector2d

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.

Return type

LVector2d

project(onto: LVecBase2d) → LVector2d

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

Return type

LVector2d

signedAngleDeg(other: LVector2d) → float

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

signedAngleRad(other: LVector2d) → float

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

static unitX() → LVector2d

Returns a unit X vector.

Return type

LVector2d

static unitY() → LVector2d

Returns a unit Y vector.

Return type

LVector2d

static zero() → LVector2d

Returns a zero-length vector.

Return type

LVector2d