Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-27-2007, 04:31 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Sequences and Series

Hurrah for math functions that will most likely be of no use at all.

PHP Code:
public function arithSeq(termfirsttermd) {
  return 
firstterm + ( ( term ) * ( ) );
}
public function 
geomSeq(termfirsttermr) {
  return ( 
firstterm ) * ( ( ) ^ ( term ) );
}
public function 
arithSeries(termfirsttermd) {
  
temp.termn arithSeq(termfirsttermd);
  return ( 
term ) * ( firstterm temp.termn );
}
public function 
geomSeries(termfirsttermr) {
  return ( 
firstterm - ( firstterm * ( term ) ) ) / ( );

(I was bored)
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 07-27-2007, 08:58 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by coreys View Post
Hurrah for math functions that will most likely be of no use at all.

PHP Code:
boffin stuff 
(I was bored)
*curls up and sucks thumb*

The sad bit it that I actually remember that stuff.... I still hate maths though.
Reply With Quote
  #3  
Old 07-27-2007, 12:42 PM
Chompy Chompy is offline
»\(║_o)/»
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Bah, I usually do that on Mal You uploaded those on mal? I remember I uploaded the fibonocci(?) code.. hmm

edit: oh, here it is

PHP Code:
public function fib(n) {
  return (((
1+5^0.5)/2)^- ((1-5^0.5)/2)^n) / (((1+5^0.5)/2) - ((1-5^0.5)/2));

But that one isn't advanced at all
__________________
Reply With Quote
  #4  
Old 07-27-2007, 02:55 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
PHP Code:
return (((1+5^0.5)/2)^- ((1-5^0.5)/2)^n) / (((1+5^0.5)/2) - ((1-5^0.5)/2)); 
__________________
Reply With Quote
  #5  
Old 07-27-2007, 02:59 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
*fetal position* ._.
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 07-27-2007, 08:07 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah I saw the fibbancci sequence on Mal's math class. I put these in there, Zeo. lol

When I did the fibbonacci sequence, I used a for loop, though, but that's OBVIOUSLY more effective. XD
It's definitely more advanced than mine at least.
P.S. Get on Maloria more. D:
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #7  
Old 07-29-2007, 09:18 AM
Chompy Chompy is offline
»\(║_o)/»
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by coreys View Post
Yeah I saw the fibbancci sequence on Mal's math class. I put these in there, Zeo. lol

When I did the fibbonacci sequence, I used a for loop, though, but that's OBVIOUSLY more effective. XD
It's definitely more advanced than mine at least.
P.S. Get on Maloria more. D:
Oh sorry I haven't been on I got a virus last night that wiped my system (corrupted it)..
kinda annoying, had to reinstall windows. Finnaly got it to work this morning..

Lost about 310 gb of data
__________________
Reply With Quote
  #8  
Old 07-29-2007, 08:14 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Daaayuuum that stinks
But I understand...I'll..attempt to continue with what Stan started ._.

Any who, I don't suppose anyone knows any good uses for these functions, do they? XD
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #9  
Old 07-29-2007, 08:17 PM
Chompy Chompy is offline
»\(║_o)/»
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by coreys View Post
Daaayuuum that stinks
But I understand...I'll..attempt to continue with what Stan started ._.

Any who, I don't suppose anyone knows any good uses for these functions, do they? XD
Uhmm, neither do I xD
__________________
Reply With Quote
  #10  
Old 07-29-2007, 08:27 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Well...a geometric series could be used for exponential growth. So if you wanted to use it for some kind of player stat (exp needed to level up, strength, etc etc) you could. Arithmetic Series could be used in similar circumstances as well. And both of those need the geometric and arithmetic sequences to work. So whoo, it can be used.

Edit: Btw, Chompy, what GMT time zone are you in, and what hours could you be on? So that I know when to be on to find you.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #11  
Old 07-29-2007, 11:31 PM
Chompy Chompy is offline
»\(║_o)/»
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by coreys View Post
Well...a geometric series could be used for exponential growth. So if you wanted to use it for some kind of player stat (exp needed to level up, strength, etc etc) you could. Arithmetic Series could be used in similar circumstances as well. And both of those need the geometric and arithmetic sequences to work. So whoo, it can be used.

Edit: Btw, Chompy, what GMT time zone are you in, and what hours could you be on? So that I know when to be on to find you.
gmt+1
__________________
Reply With Quote
  #12  
Old 07-30-2007, 12:27 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
GMT-6...7 hours apart :< I HAVE TO LOVE YOU FROM AFAR
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.