[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] propose pow



i propose this change or addition to the common libary:

SimpleNumber::

pow { arg aNumber; _Pow; ^aNumber.performBinaryOpOnSimpleNumber('pow', this) }


so instead of

x = y**2;

you have:

x = y.pow(2);



i'd like to add:

+=

as soon as i can figure out the math primitives in SC3. somewhat painful right now. but having:

x += y;

instead of:

x = x + y;

would be sweet.

and maybe:

++

so that you can:

++i ;

or

i++;

instead of:

i = i + 1;


i guess this would override the ++ append operator.


christian