8#ifndef W_FUNCTION_COMPONENT_HPP
9#define W_FUNCTION_COMPONENT_HPP
52 [[nodiscard]]
double calculate(
double x )
const;
59 std::function< double(
double ) > mFunction;
Component()
Protected constructor to restrict instantiation to derived classes.
Definition wComponent.cpp:17
void debugPrint() const
Definition wFunctionComponent.cpp:48
FunctionComponent(std::function< double(double) > function)
Constructs a FunctionComponent with a given function.
Definition wFunctionComponent.cpp:17
virtual ~FunctionComponent()=default
double calculate(double x) const
Evaluates the stored function at a given x.
Definition wFunctionComponent.cpp:32
Definition wColorComponent.cpp:9