LVector2f

from panda3d.core import LVector2f
class LVector2f

Bases: LVecBase2f

This is a two-component vector offset.

Inheritance diagram

Inheritance diagram of LVector2f

__add__(other: LVecBase2f)LVecBase2f
__add__(other: LVector2f)LVector2f
__div__(scalar: float)LVector2f
__getattr__(attr_name: str)object
__init__()
__init__(copy: LVecBase2f)

Constructs a new LVector2 from a LVecBase2

__init__(param0: LVector2f)
__init__(fill_value: float)

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

__init__(x: float, y: float)
__mul__(scalar: float)LVector2f
__repr__()str
__setattr__(attr_name: str, assign: object)int
__sub__(other: LVecBase2f)LVecBase2f
__sub__(other: LVector2f)LVector2f
__sub__(other: LVecBase2f)LVecBase2f
__sub__(other: LVector2f)LVector2f
static getClassType()TypeHandle
normalized()LVector2f

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.

project(onto: LVecBase2f)LVector2f

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

signedAngleDeg(other: LVector2f)float

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

signedAngleRad(other: LVector2f)float

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

static unitX()LVector2f

Returns a unit X vector.

static unitY()LVector2f

Returns a unit Y vector.

static zero()LVector2f

Returns a zero-length vector.