25 #ifndef SRC_QUANTITY_SCALAR_H_ 26 #define SRC_QUANTITY_SCALAR_H_ 28 #include <forward_list> 31 #include "interpolation/IInterpolate.h" 32 #include "quantity/IQuantity.h" 33 #include "quantity/ICopy.h" 44 void set(
float value) {
63 Scalar *instantiate_copy() {
64 return new Scalar(this->value);
68 void interpolate(
const Scalar& to,
double time_ratio,
Scalar& out) {
69 float delta = to.value - this->value;
70 float interpolated_value = this->value + delta;
71 out.set(interpolated_value);
74 bool getPrintableString(vector<string>& printable_string) {
75 printable_string.push_back(std::to_string(value));
79 bool getContainedQuantities(vector<IQuantity *>& quantities) {
83 bool getContainedQuantityNames(vector<string>& quantity_names) {
Definition: IQuantity.h:33