Float¶
-
class
props.
Float
¶
Float prop
This is a type of props.Prop that can be used when a props.HasProps class needs a float property.
Attributes (in addition to those inherited from props.Prop):
- MinValue:
- The minimum allowed value for the property. The default is -Inf (no minimum).
- MaxValue:
- The maximum allowed value for the property. The default is Inf (no maximum).
Example:
...
class HasFloatProp < props.HasProps
properties (Hidden, SetAccess = immutable)
FloatPropStruct = { ...
struct( ...
'Name', 'PositiveFloat', ...
'Type', @props.Float, ...
'Doc', 'A positive number', ...
'MinValue', 0 ...
) ...
}
end
...
end
See also props.Prop, props.HasProps, props.Int, props.Array