5 #ifndef BALL_MATHS_ANGLE_H
6 #define BALL_MATHS_ANGLE_H
8 #ifndef BALL_COMMON_EXCEPTION_H
12 #ifndef BALL_COMMON_DEBUG_H
16 #ifndef BALL_COMMON_CREATE_H
20 #ifndef BALL_MATHS_COMMON_H
100 explicit TAngle(
const T& new_value,
bool radian =
true);
131 void set(
const T& new_value,
bool radian =
true);
152 void get(
TAngle& angle)
const;
158 void get(T& val,
bool radian =
true)
const;
368 void dump(std::ostream& s = std::cout,
Size depth = 0)
const;
383 template <
typename T>
389 template <
typename T>
391 : value((T)angle.value)
395 template <
typename T>
397 : value((radian == true)
403 template <
typename T>
411 template <
typename T>
417 template <
typename T>
420 value = (radian ==
true)
425 template <
typename T>
432 template <
typename T>
439 template <
typename T>
445 template <
typename T>
448 val = (radian ==
true)
453 template <
typename T>
459 template <
typename T>
465 template <
typename T>
471 template <
typename T>
474 if (value == (T) 0.0)
return (T) 0.0;
478 template <
typename T>
481 if (radian == (T) 0.0)
return (T) 0.0;
485 template <
typename T>
488 if (range == RANGE__UNLIMITED)
504 if (range == RANGE__SIGNED)
520 template <
typename T>
526 template <
typename T>
532 template <
typename T>
538 template <
typename T>
541 value += angle.
value;
545 template <
typename T>
552 template <
typename T>
558 template <
typename T>
561 value -= angle.
value;
565 template <
typename T>
572 template <
typename T>
578 template <
typename T>
581 value *= angle.
value;
585 template <
typename T>
592 template <
typename T>
595 if (angle.
value == 0)
599 value /= angle.
value;
604 template <
typename T>
617 template <
typename T>
628 template <
typename T>
634 template <
typename T>
640 template <
typename T>
646 template <
typename T>
652 template <
typename T>
658 template <
typename T>
664 template <
typename T>
671 template <
typename T>
679 return (this_angle == angle);
682 template <
typename T>
688 template <
typename T>
696 s <<
" value: " << value << std::endl;
710 template <
typename T>
720 template <
typename T>
730 template <
typename T>
740 template <
typename T>
744 s >> c >> angle.
value >>
c;
753 template <
typename T>
754 std::ostream& operator << (std::ostream& s, const TAngle<T>& angle)
756 s <<
'(' << angle.value <<
')';
763 #endif // BALL_MATHS_ANGLE_H
bool isLessOrEqual(const T1 &a, const T2 &b)
TAngle & operator=(const TAngle &angle)
bool operator<(const TAngle &angle) const
#define BALL_CREATE(name)
bool isEqual(const T1 &a, const T2 &b)
TAngle & operator-=(const TAngle &angle)
bool operator!=(const TAngle &angle) const
void set(const T &new_value, bool radian=true)
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
void dump(std::ostream &s=std::cout, Size depth=0) const
TAngle & operator/=(const TAngle &angle)
void get(TAngle &angle) const
bool isGreaterOrEqual(const T1 &a, const T2 &b)
TAngle & operator+=(const TAngle &angle)
BALL_EXTERN_VARIABLE const double c
bool operator==(const TAngle &angle) const
bool operator>=(const TAngle &angle) const
TAngle & operator*=(const TAngle &angle)
#define BALL_DUMP_HEADER(os, cl, ob)
#define BALL_ANGLE_RADIAN_TO_DEGREE(rad_angle)
bool isGreater(const T1 &a, const T2 &b)
bool isNotEqual(const T1 &a, const T2 &b)
bool isLess(const T1 &a, const T2 &b)
TAngle operator/(const TAngle &val)
bool isEquivalent(TAngle angle) const
BALL_INLINE TAngle< T > operator*(const T &val, const TAngle< T > &angle)
#define BALL_DUMP_STREAM_PREFIX(os)
BALL_EXTERN_VARIABLE const double PI
PI.
ConstRandomAccessIterator< Container, DataType, Position, Traits > operator+(Distance distance, const ConstRandomAccessIterator< Container, DataType, Position, Traits > &iterator)
#define BALL_DUMP_STREAM_SUFFIX(os)
#define BALL_DUMP_DEPTH(os, depth)
BALL_INLINE TAngle< T > operator-(const T &val, const TAngle< T > &angle)
bool operator>(const TAngle &angle) const
void normalize(Range range)
#define BALL_ANGLE_DEGREE_TO_RADIAN(deg_angle)
bool operator<=(const TAngle &angle) const