|
| | Line () |
| | Constructor. More...
|
| |
| unsigned long | next () |
| | Increments one step along the line. More...
|
| |
| void | set (unsigned long value) |
| | Set the current value of the line. More...
|
| |
| void | set (unsigned long targetvalue, unsigned long num_steps) |
| | Given a target value and the number of steps to take on the way, this calculates the step size needed to get there from the current value. More...
|
| |
| void | set (unsigned long startvalue, unsigned long targetvalue, unsigned long num_steps) |
| | Given a new starting value, target value and the number of steps to take on the way, this sets the step size needed to get there. More...
|
| |
template<>
class Line< unsigned long >
Definition at line 281 of file Line.h.
Constructor.
Use the template parameter to set the type of numbers you want to use. For example, Line <int> myline; makes a Line which uses ints.
Definition at line 291 of file Line.h.
| unsigned long Line< unsigned long >::next |
( |
| ) |
|
|
inline |
Increments one step along the line.
- Returns
- the next value.
Definition at line 302 of file Line.h.
| void Line< unsigned long >::set |
( |
unsigned long |
value | ) |
|
|
inline |
Set the current value of the line.
The Line will continue incrementing from this value using any previously calculated step size.
- Parameters
-
| value | the number to set the Line's current_value to. |
Definition at line 319 of file Line.h.
| void Line< unsigned long >::set |
( |
unsigned long |
targetvalue, |
|
|
unsigned long |
num_steps |
|
) |
| |
|
inline |
Given a target value and the number of steps to take on the way, this calculates the step size needed to get there from the current value.
- Parameters
-
| targetvalue | the value to move towards. |
| num_steps | how many steps to take to reach the target. |
Definition at line 334 of file Line.h.
| void Line< unsigned long >::set |
( |
unsigned long |
startvalue, |
|
|
unsigned long |
targetvalue, |
|
|
unsigned long |
num_steps |
|
) |
| |
|
inline |
Given a new starting value, target value and the number of steps to take on the way, this sets the step size needed to get there.
- Parameters
-
| startvalue | the number to set the Line's current_value to. |
| targetvalue | the value to move towards. |
| num_steps | how many steps to take to reach the target. |
Definition at line 345 of file Line.h.