For example, say I want to be able to rotate (and in some cases scale) an object.
rotate(x1, y1, x2, y2, rotationtype)
if (rotationtype == "A")
x1 = x2 + y2
y1 = y2 - x2
return 1
else if (rotationtype == "B")
x2 = (x1 - y1)/2
y2 = (y1 + x1)/2
return 1
else
usr << "Bad rotation."
return 0
I want to be able to call rotate and get values from it IN ADDITION TO using the return command to determine whether the rotation worked or not.
How do I do this?