]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qh
Merge remote-tracking branch 'origin/master' into samual/spawn_weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qh
index 050bb2b4f85a8cc7757b1f7ce987bfa84ee07393..8abd36ece058ad5aab4e9a8499141a462722833b 100644 (file)
@@ -322,6 +322,18 @@ void queue_to_execute_next_frame(string s);
 // for marking written-to values as unused where it's a good idea to do this
 noref float unused_float;
 
+// a function f with:
+// f(0) = 0
+// f(1) = 1
+// f'(0) = startspeedfactor
+// f'(1) = endspeedfactor
+float cubic_speedfunc(float startspeedfactor, float endspeedfactor, float x);
+
+// checks whether f'(x) = 0 anywhere from 0 to 1
+// because if this is the case, the function is not usable for platforms
+// as it may exceed 0..1 bounds, or go in reverse
+float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor);
+
 #ifndef MENUQC
 vector W_CalculateSpread(vector forward, float spread, float spreadfactor, float spreadstyle)
 #endif