Added bang methods to:
atan2 cos sin atan tan sqrt log exp abs
Added arg to:
You seem to have CSS turned off.
Please don't fill out this field.
For consistency's sake, all of the math objects should respond to the bang message and accept arguments when they have a second inlet.
Well, this patch should cover everything in x_arithmetic.c.
IOhannes m zmölnig
i understand the argument to [atan2], but why would you need to [bang( all those messages?
i think it is very nice that they don't have an internal state (and actually more objects should not be bangable, just because you can)
objects with a cold inlet store the last value, by definition, so any object with a cold inlet keeps an internal state. the majority of the math objects with a cold inlet respond to a bang by using that stored value to run the calculation again. Either all of the math objects or none of the math objects should respond to the bang. Its totally arbitrary and inconsistent to have some that respond and some that don't
but i would go for the "none" route, if somebody asked me :-)
anyhow, i'm not aware of any math "unop" that can be banged (but i haven't dug deep in my memory)
I'll separate out all the changes to the unary operators into a different patch, then revise the patch here to only add the arg to atan2 and give it a bang method. This will make atan2 consistent with every other binop in arithmetic.c.
I'll also add a patch that removes the bang methods from every single class in x_arithmetic.c.
@jonathan: don't remote the bang-methods for now
I'm not in the position to decide what will actually go into Pd, that's miller.
it's probably wise to know what he will accept before doing the work (and i doubt that removing the "bang" methods from the unops will ever make it into Pd...just to stay compatible)
It makes a lot more sense to add the bang methods where they are missing that remove them. Removing them will break backwards compatibility. Adding them will make things consistent.