lib/cyberarm_engine/lib/vector.rb in cyberarm_engine-0.4.0 vs lib/cyberarm_engine/lib/vector.rb in cyberarm_engine-0.5.0
- old
+ new
@@ -158,7 +158,11 @@
end
def to_s
"X: #{@x}, Y: #{@y}, Z: #{@z}, Weight: #{@weight}"
end
+
+ def to_h
+ {x: @x, y: @y, z: @z, weight: @weight}
+ end
end
end
\ No newline at end of file