View Single Post
  #28  
Old 12-31-2004, 02:53 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by ZeroTrack
this isn’t an attack I want to know how yours is more efficient mathematically? i dont see it
Must I point out the obvious.

According to your post, a%b = a - int(a/b)*b

so if I translate Evil_Trunks's variation of your script
NPC Code:

this.hours = int(this.temp/(60*60));
this.mins = int((this.temp/60)%60);
this.secs = int((this.temp)%60);


to
NPC Code:

this.hours = int(this.temp/(60*60));
this.mins = int(this.temp/60 - int(this.temp/60^2)*60);
this.secs = int(this.temp - int(this.temp/60)*60);




You tell me what looks more efficient. Mine or yours.
Reply With Quote