28 void LineVector::standardize() {
32 double dx = ToEnd.x();
33 double dy = ToEnd.y();
52 static double inv_sqrt2 = 1/sqrt(2.0);
58 void Angle::recalcRadian()
const {
59 Radian = atan2(Normal.y(), Normal.x());
62 void Angle::recalcNormal()
const {
63 Normal =
Vector(std::cos(Radian), std::sin(Radian));
69 double mindist =
Distance(nearest, topos);
70 for (
int i = 1; i<4; ++i) {
112 / (s.
x()*t.
y() - s.
y()*t.
x());
114 factor_l2 = (p1.
ypos()-p2.
ypos()+s.
y()*factor_l1) / t.
y();
116 return p1 + factor_l1*
s;
139 nearest = line.
start();
143 nearest = line.
head();
Position nearest_linepoint(const Position &pos, const LineVector &line, double &factor)
const Position & start() const
static const double deg2rad
const double & ypos() const
ValueCounter< double > Distance
Position crosspoint(const LineVector &l1, const LineVector &l2, double &factor_l1, double &factor_l2)
const Vector & line_vector() const
static const double rad2deg
const double & xpos() const
GB_write_int const char s