I am working on a math problem with POV-Ray where I am trying to calculate the
slope of a line. I have located two points on the line with the coordinates
(9000, -8022) and (-5000, -1792). Let us assume the first set of coordinates are
identified as Ref1_Pos.x, Ref1_Pos.z while the second set are Ref2_Pos.x and
Ref2_Pos.z. The slope formula will be:
Slope = ( Ref1_Pos.z - Ref2_Pos.z )/( Ref1_Pos.x - Ref2_Pos.x )
In manual calculation the above problem gives the result: -0.304862
With POV-Ray I get: -0
I know I am doing something wrong but I cannot figure it out. Please help.
Post a reply to this message
|