Author: mrpatinhazz | Created: 2019-05-26 21:44:40
Subject: Weird X coordinate being stored in vector.
I'm building a robot based off of inferno, that uses RRT to overtakes. I'm still in an initial phase so currently states are being built in the current car position, each 500 drive() iterations. I'm printing 2 values each to a different window:
1) I'm printing to the console the position of each last state added - a toString() that prints the stored v3d of each node.
2) I'm printing text to a window I created in OpenGL with the current car position (from pub.DynGC.pos).
The thing is the first value of x is always different.
While the console prints
Current Pos :
X:4.6861e-310 Y:1124.02 Z:7.17789
The window prints
501- X:1988.899048 Y:1123.82266 Z:7.161106
I understand the reason for the slight Y and Z difference but i don't know where the 4.6861e-310 comes from. And the next states all have normal positions, it's always the first one that has this weird value. Is it an underflow? I don't make any operations to alter the value before printing it.
Last Edited: 2019-05-26 22:03:50 by