Tesseract
3.02
|
Go to the source code of this file.
Classes | |
struct | FPOINT |
Defines | |
#define | XDelta(A, B) ( (B).x - (A).x ) |
#define | YDelta(A, B) ( (B).y - (A).y ) |
#define | SlopeFrom(A, B) ( YDelta(A,B) / XDelta(A,B) ) |
#define | AngleFrom(A, B) |
#define | XIntersectionOf(A, B, X) ( SlopeFrom(A,B) * ((X) - A.x) + A.y) |
Typedefs | |
typedef FPOINT | FVECTOR |
Functions | |
FLOAT32 | DistanceBetween (FPOINT A, FPOINT B) |
FLOAT32 | NormalizedAngleFrom (FPOINT *Point1, FPOINT *Point2, FLOAT32 FullScale) |
#define AngleFrom | ( | A, | |
B | |||
) |
#define XDelta | ( | A, | |
B | |||
) | ( (B).x - (A).x ) |
#define XIntersectionOf | ( | A, | |
B, | |||
X | |||
) | ( SlopeFrom(A,B) * ((X) - A.x) + A.y) |
---------------------------------------------------------------------------- Include Files and Type Defines ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Public Code ----------------------------------------------------------------------------
Definition at line 31 of file fpoint.cpp.
Definition at line 39 of file fpoint.cpp.
{ /* ** Parameters: ** Point1, Point2 points to compute angle between ** FullScale value to associate with 2*pi ** Globals: none ** Operation: Return the angle from Point1 to Point2 normalized to ** lie in the range 0 to FullScale (where FullScale corresponds ** to 2*pi or 360 degrees). ** Return: none ** Exceptions: none ** History: Wed Mar 28 14:27:25 1990, DSJ, Created. */ FLOAT32 Angle; FLOAT32 NumRadsInCircle = 2.0 * PI; Angle = AngleFrom (*Point1, *Point2); if (Angle < 0.0) Angle += NumRadsInCircle; Angle *= FullScale / NumRadsInCircle; if (Angle < 0.0 || Angle >= FullScale) Angle = 0.0; return (Angle); } /* NormalizedAngleFrom */