Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Oct 04, 2007 6:15 am   

[2.04] #MATH with extra parenthasis
 
#MATH sideC (%sqrt((@sideA*@sideA)-(@sideB*@sideB)))

The extra evaluation parenthesis throw off the command, resulting in a value of 0. I was using it for order of operations (though i now see it isnt needed).

P.S. is there a way to do sines and cosines in CMUD?
_________________
Discord: Shalimarwildcat
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Oct 05, 2007 1:11 am   
 
This worked for me with the extra parenthesis.

To answer your PS question, the answer is yes. You can use the Lua math functions: math.sqrt, math.log, math.tan, math.cos and math.sin. math.pi
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Oct 05, 2007 1:22 am   
 
Maybe you can give us the exact values of the variables that was causing it to fail. I can't get it to fail here either.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Fri Oct 05, 2007 1:45 am   
 
Bah... i hate it when i cant reproduce an error the next day.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net