Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with divide by zero error in 3d engine.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jonny Tight Lips




PostPosted: Wed Jan 05, 2005 10:57 pm   Post subject: Help with divide by zero error in 3d engine.

Well as soon as you run it you will see that there is a divide by zero error. I have tryed everything I can think of to fix it and have had no luck. It seems to occer when the image is in the middle of the screen. Yes I could move the object from the middle of the screen but then there is other issues. If you could take a look at my file and tell me what I might need to do, it would be great. Thx


nonworking.zip
 Description:
doesn't work at all. Plz help. div by 0 error

Download
 Filename:  nonworking.zip
 Filesize:  4.42 KB
 Downloaded:  114 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Thu Jan 06, 2005 4:36 pm   Post subject: (No subject)

Well, I haven't really looked over your code, but perhaps you could use an if statement to say:
code:

if the_variable_you_are_dividing_by = 0 then
    %do the calculation only divide by 0.00000000000000001.  Close enough?
end if
Jonny Tight Lips




PostPosted: Thu Jan 06, 2005 5:03 pm   Post subject: (No subject)

That seems to have fix it. I had tryed that b4 but since it is a big eqn that the div was in I had put the + 0.0001 in the wrong place. Thanks for your help.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: