<integer>
<integer> is a Math
component that rounds its content to the nearest integer.
Attributes and Properties
Attributes for <integer>
Number display (5)
avoidScientificNotationboolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.
displayDecimalsinteger. Default value: 2. Number of decimal places to display when rendering this number.
displayDigitsinteger. Default value: 3. Number of significant digits to display when rendering this number.
displaySmallAsZeronumber. Default value: 1e-14. Threshold below which numbers are displayed as zero.
padZerosboolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Positioning (2)
anchorpoint. Default value: . Coordinates of the anchor point used to position this component on a graph.
positionFromAnchorkeyword. Where this component sits relative to its anchor point.
| Value | Description |
|---|---|
upperRight | Place the component above and to the right of the anchor point. |
upperLeft | Place the component above and to the left of the anchor point. |
lowerRight | Place the component below and to the right of the anchor point. |
lowerLeft | Place the component below and to the left of the anchor point. |
top | Place the component directly above the anchor point. |
bottom | Place the component directly below the anchor point. |
left | Place the component directly to the left of the anchor point. |
right | Place the component directly to the right of the anchor point. |
center (default) | Center the component on the anchor point. |
Other (5)
convertBooleanboolean. Default value: false. Whether to convert boolean inputs to 1/0 instead of NaN.
draggableboolean. Default value: true. Whether the number can be dragged on a graph.
layernumber. Default value: 0. Z-order layer index when shown on a graph.
renderAsMathboolean. Default value: false. Whether to render the number using math typography.
valueOnNaNnumber. Default value: NaN. Numeric value to use when the input cannot be parsed.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <integer name="i">
Number display (5)
$i.avoidScientificNotationboolean. Whether to render numbers in full decimal form rather than scientific notation.
$i.displayDecimalsinteger. Number of decimal places to display when rendering this number.
$i.displayDigitsinteger. Number of significant digits to display when rendering this number.
$i.displaySmallAsZeronumber. Threshold below which numbers are displayed as zero.
$i.padZerosboolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.
Positioning (2)
$i.anchorpoint. The coordinates where this component is anchored on the graph.
$i.positionFromAnchortext. Where this component sits relative to its anchor point.
Other (14)
$i.backgroundColortext. Human-readable name for this component's background color, derived from the active style and theme.
$i.disabledboolean. Whether this component is disabled and cannot be interacted with.
$i.draggableboolean. Whether the number can be dragged on a graph.
$i.fixedboolean. Whether this component's value is fixed and cannot be modified.
$i.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$i.latexlatex. The number rendered as LaTeX.
$i.layernumber. Z-order layer index when shown on a graph.
$i.mathmath. The number's value as a math expression.
$i.renderAsMathboolean. Whether to render the number using math typography.
$i.texttext. The number rendered as plain text.
$i.textColortext. Human-readable name for this component's text color, derived from the active style and theme.
$i.textStyleDescriptiontext. Human-readable description of this component's text styling (color and any background color).
$i.valueinteger. The integer value.
Common to all components (4)
$i.doenetMLtext. The DoenetML source code that produced this component.
$i.hideboolean. Whether to hide this component from the rendered output.
$i.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$i.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: <integer> of nested number
The named <integer> stores the enclosed number as the nearest integer value.
Example: <integer> of user-input
The named <mathInput/> is stored by the <integer> component as
the nearest integer value.