Mail Archives: djgpp/1998/02/23/05:19:46
>> > Distance = sqrt (A*A + B*B + C*C);
>> >
>> > Normal.X = (A / Distance) + VPoint[0]->Lx; // It crashes on this
line.
>
>Is A a positive number?
>Square roots of negative numbers are not defined.
I don't think this is the problem, since he is doing the sqrt() of a surely
positive quantity and the crash happens on a different line :-)
Maybe A / Distance gives a number too big (or too small) to fit within
Normal.X ?
What are the datatypes of the variables involved in the problem?
ciao
Giacomo
- Raw text -