View Single Post
Old 15th August 2003, 16:40   #117
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
Those DMs could use some optimisation. Remember that putting things in if statements means that both results are calculated so for instance:

x=if(equal(k,k4)+equal(k,k5),abs(x)*col,-abs(x)*col);

should be

x=if(equal(k,k4)+equal(k,k5),1,-1)*abs(x)*col;

one less abs and one less * than before.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote