MeshLib Documentation
Loading...
Searching...
No Matches
MR::Parabola< T > Struct Template Reference

Represents quadratic function f(x) = a*x*x + b*x + c. More...

#include <MRParabola.h>

Public Member Functions

constexpr Parabola () noexcept=default
 
constexpr Parabola (T a, T b, T c)
 
template<typename U >
constexpr Parabola (const Parabola< U > &p)
 
constexpr T operator() (T x) const
 compute value of quadratic function at any x
 
constexpr T extremArg () const
 argument (x) where parabola reaches extremal value: minimum for a > 0, maximum for a < 0
 
constexpr T extremVal () const
 value (y) where parabola reaches extremal value: minimum for a > 0, maximum for a < 0
 

Public Attributes

a = 0
 
b = 0
 
c = 0
 

Detailed Description

template<typename T>
struct MR::Parabola< T >

Represents quadratic function f(x) = a*x*x + b*x + c.

Constructor & Destructor Documentation

◆ Parabola() [1/3]

template<typename T >
MR::Parabola< T >::Parabola ( )
constexprdefaultnoexcept

◆ Parabola() [2/3]

template<typename T >
MR::Parabola< T >::Parabola ( T a,
T b,
T c )
inlineconstexpr

◆ Parabola() [3/3]

template<typename T >
template<typename U >
MR::Parabola< T >::Parabola ( const Parabola< U > & p)
inlineexplicitconstexpr

Member Function Documentation

◆ extremArg()

template<typename T >
T MR::Parabola< T >::extremArg ( ) const
inlineconstexpr

argument (x) where parabola reaches extremal value: minimum for a > 0, maximum for a < 0

◆ extremVal()

template<typename T >
T MR::Parabola< T >::extremVal ( ) const
inlineconstexpr

value (y) where parabola reaches extremal value: minimum for a > 0, maximum for a < 0

◆ operator()()

template<typename T >
T MR::Parabola< T >::operator() ( T x) const
inlineconstexpr

compute value of quadratic function at any x

Member Data Documentation

◆ a

template<typename T >
T MR::Parabola< T >::a = 0

◆ b

template<typename T >
T MR::Parabola< T >::b = 0

◆ c

template<typename T >
T MR::Parabola< T >::c = 0

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