Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → TCNF_Merfolk: 2 little questions
TCNF_Merfolk: 2 little questions
2002-11-07, 12:45 PM #1
This was posted in the Rbots forum by TCNF_Merfolk

I am wondering :

- can we do % ?

-can we do SQRT ?
sqrt(9)=3=9 pow 0.5 etc.

Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2002-11-07, 1:40 PM #2
Should I answer here or there?

1 - Yes you can use Modulus in cog.

2 - No, there is no exponets in cog that I know of, the only way to square something is x * x.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-09, 5:54 AM #3
He means, is there is suare root function.

I dunno, but try sqrt(int num) and see if it does anything.

And try power(int num, int pwr) or pwr(int num, int pwr) for exponents...

But I can't guarantee anything [http://forums.massassi.net/html/frown.gif]

------------------
The Mega-ZZTer's Gaming Haven!

New and improved! With a brand new chocolately taste!

2002-11-09, 6:12 AM #4
*Yells to the Heavens* Why can't I make you people understand!

Maybe you didn't here me the first time.
There is NO square root or exponets in cog!

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-09, 6:43 AM #5
Hmm . . exponents . . . *rubs chin*


Code:
# Exponents!!
#
# 11/2002 GBK
Symbols
Message Startup
Int Number
Int Power
Int A=0		Local
Int I=0		Local
End
Code
Startup:
Sleep(1);
A = Number;
For(I=0;I<Power;I=I+1) A = A * Number;
Printint(A);
Stop;
End


------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

GBK oNline. Cogs, tuts, and total w00tage.
And when the moment is right, I'm gonna fly a kite.
2002-11-09, 8:49 AM #6
I was talking about 5^3 I know you can do it that way, ya don't have to be in calculus to understand 5^3 is 5*5*5. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!