mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Separate matrices from non-scalars
While matrices are non-scalars in math, is_nonscalar is meant for any vector type because is_vector is specifically for the quakec vector type.
This commit is contained in:
parent
5c822f6579
commit
58b78cfdec
1 changed files with 5 additions and 0 deletions
|
@ -1555,6 +1555,11 @@ is_nonscalar (const type_t *type)
|
|||
if (type->width < 2) {
|
||||
return false;
|
||||
}
|
||||
if (type->columns > 1) {
|
||||
// while matrices are technically non-scalar, treat them as both
|
||||
// niether scalar nor non-scalar for type checking
|
||||
return false;
|
||||
}
|
||||
return is_real (type) || is_integral (type) || is_boolean (type);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue