![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cValueCurve.h>
Public Member Functions | |
| cValueCurvef () noexcept | |
| cValueCurvef (const cValueCurvef &src) | |
| bool | v_SetCurve (const cVariant &vVal) |
| void | v_GetCurve (cVariant &vVal) const |
| VALUE_t | GetLinearF (float fAge, float fLife) const |
| VALUE_t | GetLinear1000 (int iPercent1000) const |
| VALUE_t | GetChance1000 (int iPercent1000) const |
| UNITTEST_FRIEND (cValueCurvef) | |
Public Member Functions inherited from GrayLib::cValueCurveT< float > | |
| cValueCurveT () noexcept | |
| cValueCurveT (const THIS_t &src) | |
| THIS_t & | operator= (const THIS_t &src) |
| bool | isEmpty () const noexcept |
| void | Init () |
| ITERATE_t | get_EnumQty () const |
| VALUE_t | EnumValue (ITERATE_t i) const |
| VALUE_t | EnumValueCheck (ITERATE_t i) const |
| VALUE_t | GetLinearN (ITERATE_t iSelect, ITERATE_t iSelectRange) const |
| VALUE_t | GetLinear1 (float fOne) const |
| void | SetValues (ITERATE_t iQty, const VALUE_t *pnVals) |
| void | SetValuesRange (VALUE_t nLo, VALUE_t nHi) |
Additional Inherited Members | |
Public Types inherited from GrayLib::cValueCurveT< float > | |
| typedef cValueCurveT< float > | THIS_t |
| typedef float | VALUE_t |
| value/dimension type. like DVALUE_t More... | |
Static Public Member Functions inherited from GrayLib::cValueCurveT< float > | |
| static VALUE_t GRAYCALL | GetLinearA (const VALUE_t *pnArray, ITERATE_t iQty, ITERATE_t iSelect, ITERATE_t iSelectRange) |
Protected Attributes inherited from GrayLib::cValueCurveT< float > | |
| cArrayVal< VALUE_t > | m_aValues |
| array of values for defining the curve. values spaced evenly. More... | |
Describe an arbitrary 2d curve/spline for a range of floats. (not a true spline). for a range from 0 to 100 percent. arbitrary range. May be a list of probabilities from 0% to 100%.
|
inlinenoexcept |
|
inline |
| cValueCurvef::VALUE_t GrayLib::cValueCurvef::GetChance1000 | ( | int | iPercent1000 | ) | const |
m_Rate[] = the advance rate control numbers, 0 to 100 percent (How many successful uses for a gain of .1 (div by 100))
| cValueCurvef::VALUE_t GrayLib::cValueCurvef::GetLinear1000 | ( | int | iPercent1000 | ) | const |
Get Linear interpolation value from table.
| cValueCurvef::VALUE_t GrayLib::cValueCurvef::GetLinearF | ( | float | fAge, |
| float | fLife | ||
| ) | const |
Get Linear interpolation value from table. ASSUME fAge is a value in the range 0 to fLife Percent = fAge / fLife
| GrayLib::cValueCurvef::UNITTEST_FRIEND | ( | cValueCurvef | ) |
| void GrayLib::cValueCurvef::v_GetCurve | ( | cVariant & | vVal | ) | const |
Make vVal an array of cVariant values
| bool GrayLib::cValueCurvef::v_SetCurve | ( | const cVariant & | vVal | ) |
ADV_RATE = Chance at 0, to 100.0