macro_rules! params {
($($(#[$meta:meta])* $vis:vis const $name:ident = $descriptor:expr;)+) => { ... };
}Expand description
Declares a model’s parameters and their indices in one place.
The index is the declaration’s position, so it is derived rather than written down. Invoke it at
module scope, next to the impl that forwards param_descriptors to descriptors.
ⓘ
params! {
/// Reason for this default, if it needs saying.
const DENSITY = f32_param("density", "Initial Density", 0.3, 0.0, 1.0, Some(0.01));
}