A
anne001
I want to use a function which expects three arguments
GL.Scale(2.0, 0.4, 1.0);
I assumed I could put the parameters in an array
scale=[2.0, 0.4, 1.0]
pass it to an object
def initialize(scale)
@scale = scale
end
and have a method call the function
GL.Scale(@scale);
but GL.Scale expects 3 arguments, and @scale counts as one.
What is the way to pass a group of argument? It would be uggly code
to write something like
GL.Scale(@scale[0],@scale[1],@scale[2])
GL.Scale(2.0, 0.4, 1.0);
I assumed I could put the parameters in an array
scale=[2.0, 0.4, 1.0]
pass it to an object
def initialize(scale)
@scale = scale
end
and have a method call the function
GL.Scale(@scale);
but GL.Scale expects 3 arguments, and @scale counts as one.
What is the way to pass a group of argument? It would be uggly code
to write something like
GL.Scale(@scale[0],@scale[1],@scale[2])