gtsam
3rdparty
GeographicLib
examples
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>
5
#include <
GeographicLib/Utility.hpp
>
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
}
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
main
int main()
Definition:
example-Utility.cpp:10
Utility.hpp
Header for GeographicLib::Utility class.
test_docs.d2
d2
Definition:
test_docs.py:29
std
Definition:
BFloat16.h:88
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:16