struct

CG2d::Vec3(T)

Inherits Struct < Value < Object

Constructors

new(x : T, y : T, z : T)
Source

Instance methods

%(other : Vec)

Applies % to all component of this vector with the corresponding component of other

Source
%(n : Int | Float)

Applies % to all component of this vector with n

Source
*(other : Vec)

Applies * to all component of this vector with the corresponding component of other

Source
*(n : Int | Float)

Applies * to all component of this vector with n

Source
**(other : Vec)

Applies ** to all component of this vector with the corresponding component of other

Source
**(n : Int | Float)

Applies ** to all component of this vector with n

Source
+(other : Vec)

Applies + to all component of this vector with the corresponding component of other

Source
+(n : Int | Float)

Applies + to all component of this vector with n

Source
-(other : Vec)

Applies - to all component of this vector with the corresponding component of other

Source
-(n : Int | Float)

Applies - to all component of this vector with n

Source
-

Calls - on all components of this vector

Source
/(other : Vec)

Applies / to all component of this vector with the corresponding component of other

Source
/(n : Int | Float)

Applies / to all component of this vector with n

Source
//(other : Vec)

Applies // to all component of this vector with the corresponding component of other

Source
//(n : Int | Float)

Applies // to all component of this vector with n

Source
<(other : Vec3)

Tests if all components of each vector meet the < condition

Source
<(n : Int | Float)

Tests if all components of this vector meet the < condition with the given n

Source
<=(other : Vec3)

Tests if all components of each vector meet the <= condition

Source
<=(n : Int | Float)

Tests if all components of this vector meet the <= condition with the given n

Source
==(other : Vec3)

Tests if all components of each vector meet the == condition

Source
==(n : Int | Float)

Tests if all components of this vector meet the == condition with the given n

Source
>(other : Vec3)

Tests if all components of each vector meet the > condition

Source
>(n : Int | Float)

Tests if all components of this vector meet the > condition with the given n

Source
>=(other : Vec3)

Tests if all components of each vector meet the >= condition

Source
>=(n : Int | Float)

Tests if all components of this vector meet the >= condition with the given n

Source
abs

Calls abs on all components of this vector

Source
cross(other : Vec3)

Calculates the cross product of this vector and other

Source
distance(other : Vec3)

Returns the distance between this vector and other

Source
dot(other : Vec3)

Returns the dot product of this vector and other

Source
magnitude

The length or magnitude of the vector calculated by the Pythagorean theorem

Source
normal(other : Vec3)

Returns normalized value at a normal to the current vector

Source
normalized

Returns a new normalized unit Vec3

Source
sum

Add all components together

Source
to_f

Convert the components in this vector to Float64

Source
to_f32

Convert the components in this vector to Float32

Source
to_f64

Convert the components in this vector to Float64

Source
to_i

Convert the components in this vector to Int32

Source
to_i128

Convert the components in this vector to Int128

Source
to_i16

Convert the components in this vector to Int16

Source
to_i32

Convert the components in this vector to Int32

Source
to_i64

Convert the components in this vector to Int64

Source
to_i8

Convert the components in this vector to Int8

Source
to_u

Convert the components in this vector to UInt32

Source
to_u128

Convert the components in this vector to UInt128

Source
to_u16

Convert the components in this vector to UInt16

Source
to_u32

Convert the components in this vector to UInt32

Source
to_u64

Convert the components in this vector to UInt64

Source
to_u8

Convert the components in this vector to UInt8

Source
x=(x : T)
Source
y=(y : T)
Source
z=(z : T)
Source

Macros

[](*args)
Source