mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
218481764b
While it specifically checks vectors, I'm pretty sure it applies to structs, too. Also, it's a little redundant with vecaddr.r, but is much more specific and far less evil in what it does (no horrible pointer shenanigans): just something that is fairly common practice.
13 lines
143 B
R
13 lines
143 B
R
float
|
|
gety(vector v, vector z)
|
|
{
|
|
return (v + z).y;
|
|
}
|
|
|
|
int
|
|
main ()
|
|
{
|
|
vector a = [1, 2, 3];
|
|
vector b = [1, 2, 6];
|
|
return gety (a, b) != 4;
|
|
}
|