> In any event, the expression "-1 * x" should always have the same
> outcome as the expression "-x" and the latter would be one fewer
> operations in ECMAScript terms (and even if the -1 is treated as a
> negative numeric literal the unary negation operation should be faster
> than the multiplication).

> I cannot see any reason for multiplying any number by positive one.

My fault, in both cases above. The first thing I did when porting
Penner's code was sustituting 1 for all occurrences of the c and d
parameters and 0 for b, then I simplified the equations, but evidently
I forgot some 1 * <anything> here and there. I'm going to post a
revised version very soon.

> There are (inevitably) a number of uses of - Math.PI * 2 - and -
> Math.PI / 2 - in this code. It might be an idea to assign these two
> values to variables in the containing scope and employ them as
> constants in the functions.

Thumbs up. :-) This is coming in next version too.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to