disguise developers

Designer Plugins

Plugins for Disguise Designer software.

Vec2

Base class: _BlipValue

Properties

maxComponent : float (Read-Only)

minComponent : float (Read-Only)

x : float

y : float

Constructors

__init__(self)

__init__(self, other: Vec2)

Copy constructor for Vec2

__init__(self, v: Int2)

__init__(self, v: Vec)

__init__(self, _x: float, _y: float)

Methods

_initParams(self) -> Any

A serialisable tuple of the Int2 parameters

abs(self) -> Vec2

angle(self) -> float

aspect(self) -> float

dot(self, v: Vec2) -> float

length(self) -> float

normalise(self) -> Vec2

restrict(self, min: Vec2, max: Vec2) -> Vec2

rotate(self, a_: float) -> Vec2

round(self, f: float) -> Vec2

vmax(self, v: Vec2) -> Vec2

vmin(self, v: Vec2) -> Vec2

Special Methods

__add__(self, v: Vec2) -> Vec2

__div__(self, s) -> Any

__eq__(self, v: Vec2) -> bool

__getitem__(self, key) -> Any

Get an item from the Vec2 by index.

Parameters:

Returns The x element if the index is 0, the y element if the index is 1

__len__(self) -> Any

The length of the Vec2

Returns Always returns 2

__mul__(self, s) -> Any

__ne__(self, v: Vec2) -> bool

__neg__(self) -> Any

The negative of the Vec2

Returns The Vec2 with its x and y components negated

__rdiv__(self, other) -> Any

Divide another vector by this vector

Parameters:

Returns The element-wise division other/self

__repr__(self) -> Any

String representation of the Vec2

__rmul__(self, s) -> Any

__str__(self) -> Any

String representation of the Vec2

__sub__(self, v: Vec2) -> Vec2