| 1 |
const const_float_int: float = 19 |
| 2 |
const const_float_plus: float = 12 + 22 |
| 3 |
const const_float_cast: float = 76 as float |
| 4 |
|
| 5 |
const const_packed_empty: PackedFloat64Array = [] |
| 6 |
const const_packed_ints: PackedFloat64Array = [52] |
| 7 |
|
| 8 |
func test(): |
| 9 |
Utils.check(typeof(const_float_int) == TYPE_FLOAT) |
| 10 |
Utils.check(str(const_float_int) == '19.0') |
| 11 |
Utils.check(typeof(const_float_plus) == TYPE_FLOAT) |
| 12 |
Utils.check(str(const_float_plus) == '34.0') |
| 13 |
Utils.check(typeof(const_float_cast) == TYPE_FLOAT) |
| 14 |
Utils.check(str(const_float_cast) == '76.0') |
| 15 |
|
| 16 |
Utils.check(typeof(const_packed_empty) == TYPE_PACKED_FLOAT64_ARRAY) |
| 17 |
Utils.check(str(const_packed_empty) == '[]') |
| 18 |
Utils.check(typeof(const_packed_ints) == TYPE_PACKED_FLOAT64_ARRAY) |
| 19 |
Utils.check(str(const_packed_ints) == '[52.0]') |
| 20 |
Utils.check(typeof(const_packed_ints[0]) == TYPE_FLOAT) |
| 21 |
Utils.check(str(const_packed_ints[0]) == '52.0') |
| 22 |
|
| 23 |
print('ok') |