// unitDirection //-------------------------------------------------------------------------- fXY Math::unitDirection(const iXY &a, const iXY &b) { float angle = radAngle(a, b); return unitDirection(angle); } // end Math::unitDirection
// 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
// unitDirectionWest //-------------------------------------------------------------------------- fXY Math::unitDirectionWest(const fXY &northDirection) { float angle = radAngle(northDirection.x, northDirection.y); angle -= PI_DIV_2; return unitDirection(angle); } // end Math::unitDirectionWest
double NumVector::degAngle(NumVector &vector1, NumVector &vector2) { return radAngle(vector1,vector2) * 180 / 3.14159265 ; }
// degAngle //-------------------------------------------------------------------------- int Math::degAngle(float x, float y) { return rad2Deg(radAngle(x, y)); } // end Math::degAngle
// degAngle //-------------------------------------------------------------------------- int Math::degAngle(const iXY &a, const iXY &b) { return rad2Deg(radAngle(a, b)); } // end Math::degAngle