]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mathlib.h
misc. cleanup, bubble trails fixed, improved lightmap compatibility.
[xonotic/darkplaces.git] / mathlib.h
index 19d9a808eb5305bcf23db4037e674db4502fe24c..0fb1067e3150325a825724f22663b63de0b8708a 100644 (file)
--- a/mathlib.h
+++ b/mathlib.h
@@ -99,4 +99,6 @@ void BoxOnPlaneSideClassify(struct mplane_s *p);
 //             BoxOnPlaneSide( (emins), (emaxs), (p)))
 
 #define PlaneDist(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] : DotProduct((point), (plane)->normal))
-#define PlaneDiff(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] - (plane)->dist : DotProduct((point), (plane)->normal) - (plane)->dist)
\ No newline at end of file
+#define PlaneDiff(point,plane) ((plane)->type < 3 ? (point)[(plane)->type] - (plane)->dist : DotProduct((point), (plane)->normal) - (plane)->dist)
+
+#define lhrandom(MIN,MAX) ((rand() & 32767) * (((MAX)-(MIN)) * (1.0f / 32767.0f)) + (MIN))