#include <Scaling.h>
Helper class for scaling parameters.
A scaling can be:
Public Types | |
enum class | Type { Absolute , Factor , Inverse } |
The type of scaling value. More... | |
Public Member Functions | |
Scaling () | |
Default constructor: make identity. | |
Scaling (double value, Type type=Type::Absolute) | |
Constructor. | |
bool | is_identity () const |
Check whether the scaling is identity (factor or inverse with value 1). | |
operator bool () const | |
Check whether the scaling is enabled (i.e. the value is not null). | |
bool | operator!= (const Scaling &rhs) const |
Check whether two parameters are different. | |
Scaling | operator* (double value) const |
New-instance multiplication. | |
Scaling & | operator*= (double value) |
Multiply the scaling by a given factor. More... | |
Scaling | operator/ (double value) |
New-instance division. | |
Scaling & | operator/= (double value) |
Divide the scaling by a given factor. More... | |
bool | operator== (const Scaling &rhs) const |
Check whether two parameters are equal. | |
Type | type () const |
Get the scaling type. | |
double | value () const |
Get the scaling value. | |