Sylib
A C++ Library For V5
Loading...
Searching...
No Matches
sylib::SympleDerivativeSolver Class Reference

Generic Derivative Solver. More...

#include <math.hpp>

Public Member Functions

 SympleDerivativeSolver ()
 Creates a generic derivative solver that outputs the dX/dT, where X is the input value provided, and T is the time in milliseconds since the last input. Keeps track of its own timer. More...
 
double solveDerivative (double input)
 Calculates the slope between the last input value and the current input value. More...
 
double getCurrentDerivative () const
 Gets the current stored output value without adding any new input. More...
 
double getCurrentInputValue () const
 Gets the most recent input value. More...
 

Detailed Description

Generic Derivative Solver.

Constructor & Destructor Documentation

◆ SympleDerivativeSolver()

sylib::SympleDerivativeSolver::SympleDerivativeSolver ( )

Creates a generic derivative solver that outputs the dX/dT, where X is the input value provided, and T is the time in milliseconds since the last input. Keeps track of its own timer.

Member Function Documentation

◆ getCurrentDerivative()

double sylib::SympleDerivativeSolver::getCurrentDerivative ( ) const

Gets the current stored output value without adding any new input.

Returns
Derivative value

◆ getCurrentInputValue()

double sylib::SympleDerivativeSolver::getCurrentInputValue ( ) const

Gets the most recent input value.

Returns
Input value

◆ solveDerivative()

double sylib::SympleDerivativeSolver::solveDerivative ( double  input)

Calculates the slope between the last input value and the current input value.

Parameters
inputThe raw input value
Returns
Derivative value