problem with doubles

I am trying to make a script that creates hexagons in a honeycomb pattern and the hexagons to the north northeast and south east work fine but the ones to the south southwest and north west have problems being sketched wrong. i put in msgboxes to out put the coordinate created to sketch the south hexagon but when i mesure them it is in the wrong place.

SolidworksApi macros