example-Utility.cpp
Go to the documentation of this file.
1 // Example of using the GeographicLib::Utility class
2 
3 #include <iostream>
4 #include <exception>
6 
7 using namespace std;
8 using namespace GeographicLib;
9 
10 int main() {
11  try {
12  int
13  d1 = Utility::day(1939, 9, 3), // Britain declares war on Germany
14  d2 = Utility::day(1945, 8, 15); // Japan surrenders
15  cout << d2 - d1 << "\n"; // Length of Second World War for Britain
16  }
17  catch (const exception& e) {
18  cerr << "Caught exception: " << e.what() << "\n";
19  return 1;
20  }
21 }
Header for GeographicLib::Utility class.
Definition: Half.h:150
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
int main()


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:02