LibreCAD
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
geocoordinate.cpp
Go to the documentation of this file.
1
#include "
geocoordinate.h
"
2
#include "
cad/math/lcmath.h
"
3
4
using namespace
lc
;
5
using namespace
geo;
6
7
double
Coordinate::angleBetween
(
const
Coordinate
& v1,
const
Coordinate
& v2)
const
{
8
Coordinate
vStart(v1 - (*
this
));
9
Coordinate
vEnd(v2 - (*
this
));
10
return
atan2(vStart.
x
() * vEnd.
y
() - vStart.
y
() * vEnd.
x
(), vStart.
x
() * vEnd.
x
() + vStart.
y
() * vEnd.
y
());
11
}
lc::geo::Coordinate::x
double x() const
Returns x of Coordinate.
Definition:
geocoordinate.h:26
lcmath.h
lc::geo::Coordinate::y
double y() const
Returns y of Coordinate.
Definition:
geocoordinate.h:34
lc
Definition:
cadentity.h:12
lc::geo::Coordinate
Definition:
geocoordinate.h:12
geocoordinate.h
lc::geo::Coordinate::angleBetween
double angleBetween(const Coordinate &v1, const Coordinate &v2) const
Definition:
geocoordinate.cpp:7
lckernel
cad
geometry
geocoordinate.cpp
Generated on Mon Jun 18 2018 14:02:07 for LibreCAD by
1.8.8