|
UFO: Alien Invasion
|
Special, additional math algorithms for floating-point values. More...

Go to the source code of this file.
Functions | |
| double | FpCurveUp (double fpVal, double mEffect) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" upward (toward 1.0) in a curve with a controlled shape. | |
| double | FpCurveDn (double fpVal, double mEffect) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" downward (toward 0.0) in a curve with a controlled shape. | |
| double | FpCurveUpRs (double fpVal, double mEffect) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" upward (toward 1.0) in a curve with a controlled shape that is more extreme closer to 0.0 and tapers off closer to 1.0, resulting in a curve that bends into a special shape. | |
| double | FpCurveDnRs (double fpVal, double mEffect) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" downward (toward 0.0) in a curve with a controlled shape that is more extreme closer to 0.0 and tapers off closer to 1.0, resulting in a curve that bends into a special shape. | |
| double | FpCurve1D_u_in (double fpVal, double mEffect, double cntPnt) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" inward toward a given center point value in a curve with a controlled shape. | |
| double | FpCurve1D_u_out (double fpVal, double mEffect, double cntPnt) |
| Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" outward away from a given center point value in a curve with a controlled shape. The value will curve toward either 1.0 or 0.0, depending on which one would NOT mean crossing the center point. | |
| double | FpCurve1D_s_out (double fpVal, double mEffect) |
| Takes a floating-point value (double) between -1.0 and +1.0 and returns a new value within the same range, with output values skewed or "leaning" outward away from 0.0. The value will curve toward either -1.0 or +1.0, depending on which one would NOT mean crossing 0.0. | |
| float | FpUcurve_f (const float inpVal, const float hard) |
| Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f. | |
| double | FpUcurve_d (const double inpVal, const double hard) |
| Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f. | |
| float | FpUcurveSc_f (const float inpVal, const float hard, const float scale) |
| Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f. | |
| double | FpUcurveSc_d (const double inpVal, const double hard, const double scale) |
| Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f. | |
Special, additional math algorithms for floating-point values.
Definition in file mathlib_extra.cpp.
| double FpCurve1D_s_out | ( | double | fpVal, |
| double | mEffect ) |
Takes a floating-point value (double) between -1.0 and +1.0 and returns a new value within the same range, with output values skewed or "leaning" outward away from 0.0. The value will curve toward either -1.0 or +1.0, depending on which one would NOT mean crossing 0.0.
| [in] | fpVal | Initial floating-Point value (double) to be altered. May range from -1.0 to +1.0. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
Definition at line 218 of file mathlib_extra.cpp.
References DENORM, and DENORM_INV.
| double FpCurve1D_u_in | ( | double | fpVal, |
| double | mEffect, | ||
| double | cntPnt ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" inward toward a given center point value in a curve with a controlled shape.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
| [in] | cntPnt | The center point (a value between 0.0 and 1.0) that fpVal should "lean" or skew to. |
Definition at line 137 of file mathlib_extra.cpp.
References DENORM, DENORM_INV, and FpCurveDn().
Referenced by AM_CalculateTeamScores().
| double FpCurve1D_u_out | ( | double | fpVal, |
| double | mEffect, | ||
| double | cntPnt ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" outward away from a given center point value in a curve with a controlled shape. The value will curve toward either 1.0 or 0.0, depending on which one would NOT mean crossing the center point.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
| [in] | cntPnt | The center point (a value between 0.0 and 1.0) that fpVal should "lean" or skew away from. |
Definition at line 178 of file mathlib_extra.cpp.
References DENORM, DENORM_INV, and FpCurveUp().
| double FpCurveDn | ( | double | fpVal, |
| double | mEffect ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" downward (toward 0.0) in a curve with a controlled shape.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
Definition at line 59 of file mathlib_extra.cpp.
References DENORM, and DENORM_INV.
Referenced by AM_CalculateTeamScores(), AM_DoFight(), and FpCurve1D_u_in().
| double FpCurveDnRs | ( | double | fpVal, |
| double | mEffect ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" downward (toward 0.0) in a curve with a controlled shape that is more extreme closer to 0.0 and tapers off closer to 1.0, resulting in a curve that bends into a special shape.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
Definition at line 110 of file mathlib_extra.cpp.
References DENORM, and DENORM_INV.
| double FpCurveUp | ( | double | fpVal, |
| double | mEffect ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" upward (toward 1.0) in a curve with a controlled shape.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
Definition at line 36 of file mathlib_extra.cpp.
References DENORM, and DENORM_INV.
Referenced by AM_CalculateTeamScores(), and FpCurve1D_u_out().
| double FpCurveUpRs | ( | double | fpVal, |
| double | mEffect ) |
Takes a floating-point value (double) between 0.0 and 1.0 and returns a new value within the same range, with output values skewed or "leaning" upward (toward 1.0) in a curve with a controlled shape that is more extreme closer to 0.0 and tapers off closer to 1.0, resulting in a curve that bends into a special shape.
| [in] | fpVal | Initial floating-Point value (double) to be altered. |
| [in] | mEffect | How extreme the effect is (the shape of the curve). A value of 0.0 is no curve or effect at all, while a value of 1.0 is for maximum effect (very extreme). |
Definition at line 85 of file mathlib_extra.cpp.
References DENORM, and DENORM_INV.
| double FpUcurve_d | ( | const double | inpVal, |
| const double | hard ) |
Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f.
| [in] | inpVal | The original input value. |
| [in] | hard | The steepness or slope of the curve, valid values are 0.f to +inf. Higher values mean a more rapid approach of inpVal toward +1.f or -1,f. |
Definition at line 255 of file mathlib_extra.cpp.
| float FpUcurve_f | ( | const float | inpVal, |
| const float | hard ) |
Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f.
| [in] | inpVal | The original input value. |
| [in] | hard | The steepness or slope of the curve, valid values are 0.f to +inf. Higher values mean a more rapid approach of inpVal toward +1.f or -1,f. |
Definition at line 241 of file mathlib_extra.cpp.
| double FpUcurveSc_d | ( | const double | inpVal, |
| const double | hard, | ||
| const double | scale ) |
Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f.
| [in] | inpVal | The original input value. |
| [in] | hard | The steepness or slope of the curve, valid values are 0.f to +inf. Higher values mean a more rapid |
| [in] | scale | An additional scaling factor that can affect the shape of the sloped curve of potential output values. approach of inpVal toward +1.f or -1,f. |
Definition at line 285 of file mathlib_extra.cpp.
References scale.
| float FpUcurveSc_f | ( | const float | inpVal, |
| const float | hard, | ||
| const float | scale ) |
Takes a (float) of any value and outputs a value from -1.f to +1.f, along a curve, so that as the input value gets farther from 0.0f it slows down and never quite gets to +1.f or -1.f.
| [in] | inpVal | The original input value. |
| [in] | hard | The steepness or slope of the curve, valid values are 0.f to +inf. Higher values mean a more rapid |
| [in] | scale | An additional scaling factor that can affect the shape of the sloped curve of potential output values. approach of inpVal toward +1.f or -1,f. |
Definition at line 270 of file mathlib_extra.cpp.
References scale.