mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 01:00:53 +00:00
readability cleanup of vector comparisons to 0, now all such comparisons use VectorIsNull, and a little more whitespace cleanup in cl_pred.c
This commit is contained in:
parent
f922262b61
commit
05545350e7
6 changed files with 21 additions and 29 deletions
|
@ -48,6 +48,9 @@ extern int nanmask;
|
|||
#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
|
||||
#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
|
||||
|
||||
// LordHavoc: makes code more readable
|
||||
#define VectorIsNull(a) ((a)[0] == 0 && (a)[1] == 0 && (a)[2] == 0)
|
||||
|
||||
/*
|
||||
* VectorDistance, the distance between two points.
|
||||
* Yes, this is the same as sqrt(VectorSubtract then DotProduct),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue