modules/gdscript/tests/scripts/parser/features/constants.gd
raw| 1 | func test(): |
| 2 | const _TEST = 12 + 34 - 56 * 78 |
| 3 | const _STRING = "yes" |
| 4 | const _VECTOR = Vector2(5, 6) |
| 5 | const _ARRAY = [] |
| 6 | const _DICTIONARY = {"this": "dictionary"} |
| 7 | const _FLOAT1 = 1e2 |
| 8 | const _FLOAT2 = 1E2 |
| 9 | |
| 10 | # Create user constants from built-in constants. |
| 11 | const _HELLO = PI + TAU |
| 12 | const _INFINITY = INF |
| 13 | const _NOT_A_NUMBER = NAN |