float problems [modified]
-
I currently ran into a problem. It goes like this: I do some math here
__x=Cam.front.x*tmp*tan(Cam.Tx)+Cam.right.x*tmp*tan(Cam.Ty);
__y=Cam.front.y*tmp*tan(Cam.Tx)+Cam.right.y*tmp*tan(Cam.Ty);all fine and well .. my 2 variables are what were supposed to be, but when i try to assign them to a structure with more floats , all floats inside ( donno if realy ALL , but looked at some) become -1.#IND000 Anyone knows what could couse this thing ( and a solution wouldnt hurt either :D) Edit: floats that gets messed up : variables used in expresion ( Cam.front , Cam.right ) and the variable I asign the __x , __y inside the structure ( was Cam.dir)
modified on Saturday, May 24, 2008 5:00 PM
-
I currently ran into a problem. It goes like this: I do some math here
__x=Cam.front.x*tmp*tan(Cam.Tx)+Cam.right.x*tmp*tan(Cam.Ty);
__y=Cam.front.y*tmp*tan(Cam.Tx)+Cam.right.y*tmp*tan(Cam.Ty);all fine and well .. my 2 variables are what were supposed to be, but when i try to assign them to a structure with more floats , all floats inside ( donno if realy ALL , but looked at some) become -1.#IND000 Anyone knows what could couse this thing ( and a solution wouldnt hurt either :D) Edit: floats that gets messed up : variables used in expresion ( Cam.front , Cam.right ) and the variable I asign the __x , __y inside the structure ( was Cam.dir)
modified on Saturday, May 24, 2008 5:00 PM
shaderx wrote:
but when i try to assign them to a structure with more floats
struct or union? Please post more code, so that we might be able to help you. Anyway see some blindfold suggestions. 1) Check the watch window for wrong watch expressions. http://www.codeproject.com/Feature/SubtleBugs.aspx?fid=343280&fr=26&select=2542205#xx2542205xx[^] 2) Make sure the optimizations are turned off. 3) Latest Visual Studio service pack installed? (Poor man's bugfix) :rolleyes: 4) Try clean and rebuild. (Poor man's bugfix) :rolleyes: Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
-
shaderx wrote:
but when i try to assign them to a structure with more floats
struct or union? Please post more code, so that we might be able to help you. Anyway see some blindfold suggestions. 1) Check the watch window for wrong watch expressions. http://www.codeproject.com/Feature/SubtleBugs.aspx?fid=343280&fr=26&select=2542205#xx2542205xx[^] 2) Make sure the optimizations are turned off. 3) Latest Visual Studio service pack installed? (Poor man's bugfix) :rolleyes: 4) Try clean and rebuild. (Poor man's bugfix) :rolleyes: Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
-
You did? :cool: Let us know what was it. Something interesting? :)
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.