TEST(DestinationPoint, GoStraightEast) { GeographicCoordinate coord1 (16, 16, 25000); Velocity vel (100, 100, 100); //GeographicCoordinate dest = GenerationMath::DestinationPoint(coord1, vel, 90); //std::cout << "\n" << dest.GetLatitude() << " " << dest.GetLongitude() << std::endl; //ASSERT_NEAR(16.00, dest.GetLatitude(),.005); //ASSERT_NEAR(16.004, dest.GetLongitude(),.005); //GeographicCoordinate coord2 (123, 24, 345); GeographicCoordinate coord2 (50, 60, 100); GeographicCoordinate final = GenerationMath::DestinationPoint(coord2, Velocity(34, 0, 23), 270); //std::cout << "lat: " << final.GetLatitude() << " long: " << final.GetLongitude() << std::endl; GeographicCoordinate coord3 (89, 131, 345); GeographicCoordinate final2 = GenerationMath::DestinationPoint(coord3, Velocity(34, 0, 23), 270); //std::cout << "\nlat: " << final2.GetLatitude() << " long: " << final2.GetLongitude() << std::endl; }
void NoiseGen::drawCoordinates(sf::Vector2i ncoord) { std::stringstream coordS; std::stringstream coordR; std::stringstream coordE; coordR << "RAW [ X:" << xpos << ", Y:" << ypos << " ]"; coordS << "SCAL[ X:" << xpos*scale << ", Y:" << ypos*scale << " ]"; //coordE << "[ X:" << xpos + IMAGE_SIZE - 1 << ", Y:" << ypos + IMAGE_SIZE - 1 << "]"; coordE << "SIZE[ X:" << IMAGE_SIZE*MIN_SCALE*scale << ", Y:" << IMAGE_SIZE*MIN_SCALE*scale << "]"; sf::Text coordt(coordS.str(), font, 12); coordt.setPosition( ncoord.x, ncoord.y); sf::Text coord3(coordR.str(), font, 12); coord3.setPosition( ncoord.x, ncoord.y-14); sf::Text coordt2(coordE.str(), font, 12); coordt2.setPosition( ncoord.x, ncoord.y+14); screen->draw(coordt); screen->draw(coordt2); screen->draw(coord3); }