Пример #1
0
// unitDirection
//--------------------------------------------------------------------------
fXY Math::unitDirection(const iXY &a, const iXY &b)
{
    float angle = radAngle(a, b);

    return unitDirection(angle);

} // end Math::unitDirection
Пример #2
0
// unitDirectionEast
//--------------------------------------------------------------------------
fXY Math::unitDirectionEast(const fXY &northDirection)
{
    float angle = radAngle(northDirection.x, northDirection.y);

    angle += M_PI / 2.0;

    return unitDirection(angle);

} // end Math::unitDirectionEast
Пример #3
0
// unitDirectionWest
//--------------------------------------------------------------------------
fXY Math::unitDirectionWest(const fXY &northDirection)
{
	float angle = radAngle(northDirection.x, northDirection.y);

	angle -= PI_DIV_2;

	return unitDirection(angle);

} // end Math::unitDirectionWest
Пример #4
0
double NumVector::degAngle(NumVector &vector1, NumVector &vector2) {
    return radAngle(vector1,vector2) * 180 / 3.14159265 ;
}
Пример #5
0
// degAngle
//--------------------------------------------------------------------------
int Math::degAngle(float x, float y)
{
    return rad2Deg(radAngle(x, y));

} // end Math::degAngle
Пример #6
0
// degAngle
//--------------------------------------------------------------------------
int Math::degAngle(const iXY &a, const iXY &b)
{
    return rad2Deg(radAngle(a, b));

} // end Math::degAngle