mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Add is_float ().
For now, it checks just floats, but I might one day add doubles.
This commit is contained in:
parent
85bffbcad0
commit
fe4df03896
2 changed files with 8 additions and 1 deletions
|
@ -147,6 +147,7 @@ const char *encode_params (type_t *type);
|
|||
void encode_type (struct dstring_s *encoding, type_t *type);
|
||||
int is_enum (type_t *type);
|
||||
int is_integral (type_t *type);
|
||||
int is_float (type_t *type);
|
||||
int is_scalar (type_t *type);
|
||||
int is_math (type_t *type);
|
||||
int is_struct (type_t *type);
|
||||
|
|
|
@ -646,10 +646,16 @@ is_integral (type_t *type)
|
|||
return is_enum (type);
|
||||
}
|
||||
|
||||
int
|
||||
is_float (type_t *type)
|
||||
{
|
||||
return type->type == ev_float;
|
||||
}
|
||||
|
||||
int
|
||||
is_scalar (type_t *type)
|
||||
{
|
||||
return type->type == ev_float || is_integral (type);
|
||||
return is_float (type) || is_integral (type);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue