lib/processing/vector.rb in processing-0.5.9 vs lib/processing/vector.rb in processing-0.5.10

- old
+ new

@@ -147,13 +147,15 @@ v1.dup.lerp v2, amount end # Returns x, y, z as an array # + # @param n [Numeric] number of dimensions + # # @return [Array] array of x, y, z # - def array() - @point.to_a 3 + def array(n = 3) + @point.to_a n end alias to_a array # Adds a vector.