PF2d::Vec4(T)
Inherits Comparable < PF2d::Vec < Struct < Value < Object
Constructors
new(x : T, y : T, z : T, w : T)
SourceClass methods
[](*args)
Creates a new Vec with the given args
PF2d::Vec[1, 2] # => PF2d::Vec2(Int32)(@x=1, @y=2)
Instance methods
%(other : Vec4)
Applies % to all component of this Vec with the corresponding component of other
%(other : Indexable)
Source*(other : Vec4)
Applies * to all component of this Vec with the corresponding component of other
*(matrix : Matrix)
Multiply this Vec by a matrix
v = PF2d::Vec[1, 2, 3]
m = PF::Matrix[
1, 0, 0,
0, 2, 0,
0, 0, 1,
]
# => PF2d::Vec3(Int32)(@x=1, @y=4, @z=3)
*(other : Indexable)
Source**(other : Vec4)
Applies ** to all component of this Vec with the corresponding component of other
**(other : Indexable)
Source+(other : Vec4)
Applies + to all component of this Vec with the corresponding component of other
+(other : Indexable)
Source-(other : Vec4)
Applies - to all component of this Vec with the corresponding component of other
-(other : Indexable)
Source/(other : Vec4)
Applies / to all component of this Vec with the corresponding component of other
/(other : Indexable)
Source//(other : Vec4)
Applies // to all component of this Vec with the corresponding component of other
//(other : Indexable)
Sourceceil
Sourcefloor
Sourcemap
Sourceround(precision = 0)
Sourceround32(precision = 0)
Sourceto(type)
Sourceto_tuple
Sourceto_vec2
Sourcew
w=(w : T)
x
x=(x : T)
y
y=(y : T)
z
z=(z : T)