PyHelios 0.1.11
Loading...
Searching...
No Matches
pyhelios.wrappers.DataTypes.vec2 Class Reference

Detailed Description

Definition at line 136 of file DataTypes.py.

+ Inheritance diagram for pyhelios.wrappers.DataTypes.vec2:
+ Collaboration diagram for pyhelios.wrappers.DataTypes.vec2:

Public Member Functions

str __repr__ (self)
 
str __str__ (self)
 
 __new__ (cls, x=None, y=None)
 Create only pass cls to prevent TypeError on Windows.
 
 __init__ (self, float x=0, float y=0)
 
 from_list (self, List[float] input_list)
 
List[float] to_list (self)
 
float magnitude (self)
 Return the magnitude (length) of the vector.
 
'vec2normalize (self)
 Return a normalized copy of this vector (unit length).
 

Public Attributes

 x = float(x)
 
 y = float(y)
 

Static Protected Member Functions

bool _is_finite_numeric (value)
 Check if value is a finite number (not NaN or inf).
 

Static Protected Attributes

list _fields_
 

Constructor & Destructor Documentation

◆ __init__()

pyhelios.wrappers.DataTypes.vec2.__init__ ( self,
float x = 0,
float y = 0 )

Definition at line 152 of file DataTypes.py.

Member Function Documentation

◆ __new__()

pyhelios.wrappers.DataTypes.vec2.__new__ ( cls,
x = None,
y = None )

Create only pass cls to prevent TypeError on Windows.

Definition at line 149 of file DataTypes.py.

◆ __repr__()

str pyhelios.wrappers.DataTypes.vec2.__repr__ ( self)

Definition at line 142 of file DataTypes.py.

◆ __str__()

str pyhelios.wrappers.DataTypes.vec2.__str__ ( self)

Definition at line 145 of file DataTypes.py.

◆ _is_finite_numeric()

bool pyhelios.wrappers.DataTypes.vec2._is_finite_numeric ( value)
staticprotected

Check if value is a finite number (not NaN or inf).

Definition at line 187 of file DataTypes.py.

◆ from_list()

pyhelios.wrappers.DataTypes.vec2.from_list ( self,
List[float] input_list )

Definition at line 164 of file DataTypes.py.

◆ magnitude()

float pyhelios.wrappers.DataTypes.vec2.magnitude ( self)

Return the magnitude (length) of the vector.

Definition at line 172 of file DataTypes.py.

◆ normalize()

'vec2' pyhelios.wrappers.DataTypes.vec2.normalize ( self)

Return a normalized copy of this vector (unit length).

Definition at line 177 of file DataTypes.py.

◆ to_list()

List[float] pyhelios.wrappers.DataTypes.vec2.to_list ( self)

Definition at line 168 of file DataTypes.py.

Member Data Documentation

◆ _fields_

list pyhelios.wrappers.DataTypes.vec2._fields_
staticprotected

Definition at line 140 of file DataTypes.py.

◆ x

pyhelios.wrappers.DataTypes.vec2.x = float(x)

Definition at line 161 of file DataTypes.py.

◆ y

pyhelios.wrappers.DataTypes.vec2.y = float(y)

Definition at line 162 of file DataTypes.py.


The documentation for this class was generated from the following file: