NWN2 Toolset

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Maths: Powers functions

 
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Scripting Help
View previous topic :: View next topic  
Author Message
Malice



Joined: 17 Oct 2007
Posts: 9
Location: Luton UK

PostPosted: Tue Jan 08, 2008 12:01 am    Post subject: Maths: Powers functions Reply with quote

I am trying to figure the best (i.e. most efficient) way to get the following result:

for example

nInt=0 then x=1
iInt =1 then x=2
nInt=2 then x=4
nInt=3 then x=8
....
nInt=n then x= 2^n


Does this work?
nInt^=2;

or is it only possible with
nInt=(2^nInt);

_________________
------------------
PJ
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Scripting Help 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





Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.

Abuse - Report Abuse
Powered by forumup.com free forum, create your free forum!
Created by Raulken of Hyarbor S.r.l.
TOS & Privacy.

Page generation time: 0.031