Module 02_Enum
C++ Enum utilities
Functions
Enum:Compare (e1, e2) | Compare two enums and return a numerical value describing the similarity |
ToEnumShortString (e) | Convert an enum value into its short form This is based on the game enum convention that they are all named ENUMvalue This will return "value" instead of "ENUMvalue" |
Functions
- Enum:Compare (e1, e2)
-
Compare two enums and return a numerical value describing the similarity
Parameters:
- e1 Enum value 1
- e2 Enum value 2
Returns:
-
number
The difference between the enum values
- ToEnumShortString (e)
-
Convert an enum value into its short form
This is based on the game enum convention that they are all named ENUMvalue
This will return "value" instead of "ENUMvalue"
Parameters:
- e Enum value
Returns:
-
string
A substring made up of only the last part of the enum value string after the '_'