Class: IRB::Vec
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/irb/easter-egg.rb |
Class Attribute Summary
Class Method Summary
Class Attribute Details
.x (readonly)
[ GitHub ].y (readonly)
[ GitHub ].z (readonly)
[ GitHub ]Class Method Details
.cross(other)
[ GitHub ].dot(other)
[ GitHub ].initialize(x, y, z)
[ GitHub ].normalize
[ GitHub ]# File 'lib/irb/easter-egg.rb', line 25
def normalize r = Math.sqrt(self.dot(self)) Vec.new(@x / r, @y / r, @z / r) end