Why Quake trats negative vectors as FALSE?
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Why Quake trats negative vectors as FALSE?
Maybe a silly question, but '0 -1 0' is FALSE when i compare it with "if". Is there some reason why? I wonder whether this operation is undefined ...
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
if (somevector)
{
}
I assume?
expands to IFNOT somevector_x, $numberofinstructionsinthebraces
IFNOT tests the variable as an int. not as a vector, so only tests the first against binary 0, rather than float 0 or anything fashionable like that.
{
}
I assume?
expands to IFNOT somevector_x, $numberofinstructionsinthebraces
IFNOT tests the variable as an int. not as a vector, so only tests the first against binary 0, rather than float 0 or anything fashionable like that.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest