I hadn't got so far as to use GetDistance(), but I tried it out and it does provide some strange results.
Code: Select all
SendChat(GetGameTick() / 10 .. " seconds")
SendChat(GetDistance (siLos[1]:GetLongitude(), siLos[1]:GetLatitude(), siLos[2]:GetLongitude(), siLos[2]:GetLatitude())) <- find distance between Silo 1 and Silo 2
SendChat(GetDistance (siLos[1]:GetLongitude(), siLos[1]:GetLatitude(), siLos[1]:GetLongitude(), siLos[1]:GetLatitude()))<- find distance between Silo 1 and Silo 1 (expect to be zero)
SendChat(GetDistance ( -0.166700, 51.500000, -74.000000, 40.750000) .. " London to New York") <- find distance between London and New York
WhiteboardDraw(-0.166700, 51.500000, -74.000000, 40.750000) <- Line from London to New York
WhiteboardDraw(siLos[1]:GetLongitude(), siLos[1]:GetLatitude(), siLos[2]:GetLongitude(), siLos[2]:GetLatitude()) <- Line from Silo 1 to Silo 2
WhiteboardDraw(siLos[1]:GetLongitude(), siLos[1]:GetLatitude(), siLos[1]:GetLongitude(), siLos[1]:GetLatitude()) <- Line from Silo 1 to Silo 1 (expect to see dot, or nothing)
Clearly, my silos are not as far apart as New York and London are.
Silo 1 and 2 are the bottom row, starting on the left. If you ignore the other whiteboard markings (squares), you can see the line from 1 to 2. Also, I didn't realize till now that London is basically zero Longitude on the grid. Hmm.
(that cross is zero x, zero y, visual aid for me)
Edit: Oh yeah, I was on your server last night for a long time, where were you?!