#include "const.h"
#include "fpoint.h"
#include <stdio.h>
#include <math.h>
Go to the source code of this file.
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).
Point1,Point2 | Points to compute angle between | |
FullScale | Value to associate with 2*pi |
Definition at line 41 of file fpoint.cpp.
Referenced by AddOutlineFeatureToSet(), ConvertSegmentToPicoFeat(), and ExtractMicroFeature().
00043 { 00044 FLOAT32 Angle; 00045 FLOAT32 NumRadsInCircle = 2.0 * PI; 00046 00047 Angle = AngleFrom (*Point1, *Point2); 00048 if (Angle < 0.0) 00049 Angle += NumRadsInCircle; 00050 Angle *= FullScale / NumRadsInCircle; 00051 if (Angle < 0.0 || Angle >= FullScale) 00052 Angle = 0.0; 00053 return (Angle); 00054 00055 } /* NormalizedAngleFrom */