Struct air_script_core::Constant
source · pub struct Constant { /* private fields */ }
Expand description
Stores a constant’s name and value. There are three types of constants:
- Scalar: 123
- Vector: [1, 2, 3]
- Matrix: [[1, 2, 3], [4, 5, 6]]
Implementations§
source§impl Constant
impl Constant
sourcepub fn new(name: Identifier, value: ConstantType) -> Self
pub fn new(name: Identifier, value: ConstantType) -> Self
Returns a new instance of a Constant
sourcepub fn name(&self) -> &Identifier
pub fn name(&self) -> &Identifier
Returns the name of the Constant
sourcepub fn value(&self) -> &ConstantType
pub fn value(&self) -> &ConstantType
Returns the value of the Constant