22#ifndef KIG_MISC_COMMON_H
23#define KIG_MISC_COMMON_H
25#include "coordinate.h"
36extern const double double_inf;
43double getDoubleFromUser(
const TQString& caption,
const TQString& label,
double value,
44 TQWidget* parent,
bool* ok,
double min,
double max,
int decimals );
76 double length()
const {
return (
b -
a ).length(); }
154 const double sa,
const double angle,
167double calcDistancePointLine(
const Coordinate& p,
178void calcBorderPoints(
double& xa,
double& xb,
double& ya,
double& yb,
const Rect& r);
199void calcRayBorderPoints(
const double xa,
const double xb,
double& ya,
200 double& yb,
const Rect& r );
218bool isSingular(
const double& a,
const double& b,
219 const double& c,
const double& d );
240 const double sa,
const double a,
const double fault );
244 double sqra,
double sqrb );
252 const int width,
const ObjectImp* imp,
const KigWidget& w );
255T kigMin(
const T& a,
const T& b )
257 return a < b ? a : b;
261T kigMax(
const T& a,
const T& b )
263 return a > b ? a : b;
267T kigAbs(
const T& a )
269 return a >= 0 ? a : -a;
273int kigSgn(
const T& a )
275 return a == 0 ? 0 : a > 0 ? +1 : -1;
278extern const double test_threshold;
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
Simple class representing a line.
Definition common.h:49
Coordinate b
Another point on the line.
Definition common.h:68
const Coordinate dir() const
The direction of the line.
Definition common.h:72
LineData(const Coordinate &na, const Coordinate &nb)
Constructor.
Definition common.h:60
bool isOrthogonalTo(const LineData &l) const
Return true if this line is orthogonal to l.
Coordinate a
One point on the line.
Definition common.h:64
double length() const
The length from a to b.
Definition common.h:76
bool isParallelTo(const LineData &l) const
Return true if this line is parallel to l.
LineData()
Definition common.h:56
The Object class represents the behaviour of an object after it is calculated.
Definition object_imp.h:219