24 using namespace basis;
31 : _radius(a_radius), _center(a_center) {}
44 cartesian_point second(cos(rotation) * _radius, sin(rotation) * _radius);
45 return _center + second;
50 double dist = where.
distance(_center);
51 return dist <= _radius? true :
false;
56 const double deg0 = 0;
contents get(angular_units unit) const
retrieves the current angular measure.
Provides a geometric point that use double floating points numbers.
Provides a geometric rectangle that use double floating points numbers.
double circumference() const
Returns the perimeter for the circle.
cartesian_rectangle dimensions() const
Returns a bounding box around the circle.
double radius() const
Half of the circle's diameter.
bool inside(const cartesian_point &where) const
Returns true if the point is inside the circle.
double area() const
Returns the area occupied by the circle.
cartesian_point center() const
The point at the center of the circle.
cartesian_point location(const double_angle &where) const
Returns the point on the circle that is at the angle "where".
double diameter() const
Returns the length of the circle's bisecting line.
double_angle provides a non-templated class for forward declarations.
numeric_type distance(const point &p2) const
Returns the distance between ‘this’ and the second point ‘p2’.
#define PI_APPROX
An approximation of the fundamental circular constant.
The guards collection helps in testing preconditions and reporting errors.
type square(const type &a)
Returns the square of the object (which is a * a).
Contains all of our objects for geometry and avoids name clashes.