2D size definition class
More...
#include <size_2d.h>
|
|
| Size2D () |
| | default constructor.
|
| | Size2D (const double &length, const double &width) |
| | constructor with variables
|
| const Size2D & | assign (const double &length, const double &width) |
| | assign new range directly.
|
| const Size2D & | setLength (const double &length) |
| | set new X range
|
| const Size2D & | setWidth (const double &width) |
| | set new Y range
|
| const double & | length () const |
| | get the value of X range
|
| const double & | width () const |
| | get the value of Y range
|
| double | diagonal () const |
| | get the length of diagonal line
|
| std::ostream & | print (std::ostream &os) const |
| | output values to stream.
|
◆ Size2D()
| rcsc::Size2D::Size2D |
( |
const double & | length, |
|
|
const double & | width ) |
|
inline |
constructor with variables
- Parameters
-
| length | x range |
| width | y range |
◆ assign()
| const Size2D & rcsc::Size2D::assign |
( |
const double & | length, |
|
|
const double & | width ) |
|
inline |
assign new range directly.
- Parameters
-
| length | new X range |
| width | new Y range |
- Returns
- reference to itself
◆ diagonal()
| double rcsc::Size2D::diagonal |
( |
| ) |
const |
|
inline |
get the length of diagonal line
- Returns
- length of diagonal line
◆ length()
| const double & rcsc::Size2D::length |
( |
| ) |
const |
|
inline |
get the value of X range
- Returns
- value of X range
◆ print()
| std::ostream & rcsc::Size2D::print |
( |
std::ostream & | os | ) |
const |
|
inline |
output values to stream.
- Parameters
-
| os | reference to the output stream |
- Returns
- reference to the output stream
◆ setLength()
| const Size2D & rcsc::Size2D::setLength |
( |
const double & | length | ) |
|
|
inline |
set new X range
- Parameters
-
- Returns
- reference to itself
◆ setWidth()
| const Size2D & rcsc::Size2D::setWidth |
( |
const double & | width | ) |
|
|
inline |
set new Y range
- Parameters
-
- Returns
- reference to itself
◆ width()
| const double & rcsc::Size2D::width |
( |
| ) |
const |
|
inline |
get the value of Y range
- Returns
- value of Y range
The documentation for this class was generated from the following file: