X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=mathlib.h;h=0fb1067e3150325a825724f22663b63de0b8708a;hp=19d9a808eb5305bcf23db4037e674db4502fe24c;hb=c98b091c10dc46797648b3ade88ec24076eb092c;hpb=8dcce44300385b12c46d494c06aadcfa35a8bc14 diff --git a/mathlib.h b/mathlib.h index 19d9a808..0fb1067e 100644 --- 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))