mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-17 00:24:05 +00:00
Add intrinsics.constant_(floor|truncate|ceil|round)
This commit is contained in:
@@ -1296,6 +1296,15 @@ gb_internal bool is_type_rune(Type *t) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
gb_internal bool is_type_integer_or_float(Type *t) {
|
||||
t = base_type(t);
|
||||
if (t == nullptr) { return false; }
|
||||
if (t->kind == Type_Basic) {
|
||||
return (t->Basic.flags & (BasicFlag_Integer|BasicFlag_Float)) != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
gb_internal bool is_type_numeric(Type *t) {
|
||||
t = base_type(t);
|
||||
if (t == nullptr) { return false; }
|
||||
|
||||
Reference in New Issue
Block a user