35template <
class numeric_type>
101template <
class numeric_type>
104template <
class numeric_type>
108template <
class numeric_type>
117template <
class numeric_type>
121template <
class numeric_type>
128template <
class numeric_type>
132template <
class numeric_type>
139template <
class numeric_type>
146template <
class contents>
152 return temp.length();
155template <
class contents>
162template <
class contents>
170template <
class numeric_type>
177template <
class numeric_type>
181template <
class numeric_type>
185template <
class numeric_type>
187{ _x +=
arg2.x(); _y +=
arg2.y();
return *
this; }
189template <
class numeric_type>
191{ _x -=
arg2.x(); _y -=
arg2.y();
return *
this; }
193template <
class numeric_type>
202template <
class numeric_type>
215template <
class numeric_type>
Provides a dynamically resizable ASCII character string.
int convert(int default_value) const
Converts the string into a corresponding integer.
A very common template for a dynamic array of bytes.
Outcomes describe the state of completion for an operation.
A base class for objects that can pack into an array of bytes.
contents cosine() const
returns the cos function of this angle.
virtual void pack(basis::byte_array &packed_form) const
packs the angle for shipping in bytes.
contents sine() const
returns the sin function of this angle.
static angle arctangent(double opposite, double adjacent, basis::outcome &retval)
returns the atan of the angle.
void set(contents a, angular_units unit)
sets the angle to a new rotation "a" in the "unit".
double_angle provides a non-templated class for forward declarations.
Represents a geometric point.
void set(numeric_type r, double_angle theta)
point(numeric_type r, double_angle theta)
bool operator==(const point &arg2) const
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
point operator-() const
return the additive inverse of the vector
void set(numeric_type x, numeric_type y)
point operator+(const point &arg2) const
basis::astring text_form() const
Prints out the two values (x and y) held in the point.
bool from_text(const basis::astring &text)
returns true if the "text" is successfully pulled into this point.
numeric_type distance(const point &p2) const
Returns the distance between ‘this’ and the second point ‘p2’.
point & operator+=(const point &arg2)
point(numeric_type x=0, numeric_type y=0)
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
int packed_size() const
Estimates the space needed for the packed structure.
numeric_type magnitude() const
return the distance from the origin to this point.
point & operator-=(const point &arg2)
DEFINE_CLASS_NAME("point")
double_angle theta() const
point rotate(const double_angle &theta) const
Rotates the point by the angle "theta".
Provides some fairly low-level math support.
type square(const type &a)
Returns the square of the object (which is a * a).
type absolute_value(type a)
Returns a if a is non-negative, and returns -a otherwise.
Contains all of our objects for geometry and avoids name clashes.
basis::astring numeric_specifier(numeric_type t)
Guesses the formatting string needed for the type provided.
astring crop_non_numeric(const astring &input)
Eats the non-numeric characters from the front of "input".
astring crop_numeric(const astring &input)
Eats the numeric characters from the front of "input".
void attach(byte_array &packed_form, const byte_array &to_attach)
Packs a byte_array "to_attach" into "packed_form".
bool detach(byte_array &packed_form, byte_array &to_detach)
Unpacks a byte_array "to_detach" from "packed_form".