Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
MathUtils::Linear Class Reference

Linear function functor: f(x) = a*x + b. More...

#include <MathUtils_FunctorScalar.hxx>

Public Member Functions

 Linear (double theSlope, double theIntercept)
 Constructor from slope and intercept.
 
bool Value (double theX, double &theY) const
 Evaluates linear function a*x + b.
 
bool Values (double theX, double &theY, double &theDY) const
 Evaluates linear function and derivative.
 

Detailed Description

Linear function functor: f(x) = a*x + b.

Constructor & Destructor Documentation

◆ Linear()

MathUtils::Linear::Linear ( double theSlope,
double theIntercept )
inline

Constructor from slope and intercept.

Parameters
theSlopecoefficient a (slope)
theInterceptcoefficient b (y-intercept)

Member Function Documentation

◆ Value()

bool MathUtils::Linear::Value ( double theX,
double & theY ) const
inline

Evaluates linear function a*x + b.

Parameters
[in]theXinput value
[out]theYfunction value
Returns
true (always succeeds)

◆ Values()

bool MathUtils::Linear::Values ( double theX,
double & theY,
double & theDY ) const
inline

Evaluates linear function and derivative.

Parameters
[in]theXinput value
[out]theYfunction value
[out]theDYderivative (= slope)
Returns
true (always succeeds)

The documentation for this class was generated from the following file: