|
Xonotic
|
#include "lib/float.qh"
Include dependency graph for math.qh:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | crandom() (2 * (random() - 0.5)) |
| Returns a random number between -1.0 and 1.0. More... | |
| #define | MEAN_ACCUMULATE(s, prefix, v, w) mean_accumulate(s, prefix##_accumulator, prefix##_count, prefix##_mean, v, w) |
| #define | MEAN_DECLARE(prefix, m) float prefix##_mean = m; .float prefix##_count, prefix##_accumulator |
| #define | MEAN_EVALUATE(s, prefix) mean_evaluate(s, prefix##_accumulator, prefix##_count, prefix##_mean) |
| #define | power2of(e) (2 ** e) |
| #define crandom | ( | ) | (2 * (random() - 0.5)) |
Returns a random number between -1.0 and 1.0.
Definition at line 27 of file math.qh.
Referenced by ctf_Handle_Throw(), Item_ScheduleRespawn(), and ka_DropEvent().
| #define MEAN_ACCUMULATE | ( | s, | |
| prefix, | |||
| v, | |||
| w | |||
| ) | mean_accumulate(s, prefix##_accumulator, prefix##_count, prefix##_mean, v, w) |
Definition at line 22 of file math.qh.
Referenced by anticheat_physics().
| #define MEAN_EVALUATE | ( | s, | |
| prefix | |||
| ) | mean_evaluate(s, prefix##_accumulator, prefix##_count, prefix##_mean) |
Definition at line 229 of file math.qh.
References ERASEABLE, fabs(), FLOAT_EPSILON, and max().
Referenced by DamageText::DamageText_update(), and MUTATOR_HOOKFUNCTION().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 236 of file math.qh.
References ERASEABLE, max(), and median().
Referenced by Slider_draw(), Slider_keyDown(), Slider_mouseDrag(), and Slider_valueToText().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 129 of file math.qh.
References ERASEABLE.
Referenced by SUB_CalcMove_controller_think().
Here is the caller graph for this function:Definition at line 138 of file math.qh.
References ERASEABLE.
Referenced by set_platmovetype().
Here is the caller graph for this function:continuous function mapping all reals into 0..1
Definition at line 210 of file math.qh.
References ERASEABLE, and float2range11().
Here is the call graph for this function:continuous function mapping all reals into -1..1
Definition at line 203 of file math.qh.
References ERASEABLE, and fabs().
Referenced by float2range01(), and GetCurrentFov().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 57 of file math.qh.
References ERASEABLE, and rint().
Referenced by pathlib_astar(), pathlib_flynode(), pathlib_nodeatpoint(), pathlib_swimnode(), pathlib_walknode(), and pathlib_wateroutnode().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 81 of file math.qh.
References ERASEABLE, and lerpratio().
Here is the call graph for this function:Definition at line 87 of file math.qh.
References ERASEABLE, f1, and lerpratio().
Here is the call graph for this function:Definition at line 75 of file math.qh.
References ERASEABLE.
Referenced by lerp(), and lerp3ratio().
Here is the caller graph for this function:Definition at line 108 of file math.qh.
References ERASEABLE.
Referenced by antilag_takebackorigin().
Here is the caller graph for this function:Definition at line 101 of file math.qh.
References ERASEABLE, f1, and lerpvratio().
Here is the call graph for this function:Definition at line 95 of file math.qh.
References ERASEABLE.
Referenced by lerpv3ratio().
Here is the caller graph for this function:| ERASEABLE float map_bound_ranges | ( | float | value, |
| float | src_min, | ||
| float | src_max, | ||
| float | dest_min, | ||
| float | dest_max | ||
| ) |
Same as map_ranges except that values outside the source range are clamped to min or max.
Definition at line 375 of file math.qh.
References map_ranges().
Referenced by DamageText::DamageText_update(), and determine_force().
Here is the call graph for this function:
Here is the caller graph for this function:| ERASEABLE float map_ranges | ( | float | value, |
| float | src_min, | ||
| float | src_max, | ||
| float | dest_min, | ||
| float | dest_max | ||
| ) |
Maps values between the src and dest range: src_min to dest_min, src_max to dest_max, values between them to the corresponding values between and extrapolates for values outside the range.
src_min and src_max must not be the same or division by zero occurs.
dest_max can be smaller than dest_min if you want the resulting range to be inverted, all values can be negative.
Definition at line 366 of file math.qh.
References ERASEABLE.
Referenced by map_bound_ranges().
Here is the caller graph for this function:Definition at line 216 of file math.qh.
References bound(), and ERASEABLE.
Referenced by almost_in_bounds(), Slider_keyDown(), Slider_mouseDrag(), XonoticSliderCheckBox_configureXonoticSliderCheckBox(), XonoticSliderCheckBox_draw(), and XonoticSliderCheckBox_setChecked().
Here is the call graph for this function:
Here is the caller graph for this function:ax^2 + bx + c = 0
Definition at line 307 of file math.qh.
References ERASEABLE, sqrt(), v, and vector().
Referenced by get_shotvelocity(), solve_shotdirection(), StartFrame(), and trigger_push_calculatevelocity().
Here is the call graph for this function:
Here is the caller graph for this function: