ReferencewrapNumberPeriodic

<wrapNumberPeriodic>

Wraps a number into a periodic range

<wrapNumberPeriodic> is a Math Operator component that wraps a number line around a circle.

Attributes and Properties

Attributes for <wrapNumberPeriodic>

Highlighted (3)
displayDigits

integer. Default value: 3. Number of significant digits to display when rendering this number.

format

keyword. Input format.

ValueDescription
text (default)Plain-text math notation (e.g., x^2 + 1).
latexLaTeX-formatted math (e.g., x^{2} + 1).
simplify

keyword. Level of simplification applied to the expression.

ValueDescription
none (default)No simplification is applied.
fullFully simplify the expression.
numbersSimplify numeric subexpressions only, leaving symbolic structure intact.
numbersPreserveOrderLike numbers, but does not reorder commutative operands.
normalizeOrderReorder commutative operands into a canonical form without simplifying values.
Number display (5)
avoidScientificNotation

boolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.

displayDecimals

integer. Default value: 2. Number of decimal places to display when rendering this number.

displayDigits

integer. Default value: 3. Number of significant digits to display when rendering this number.

displaySmallAsZero

number. Default value: 1e-14. Threshold below which numbers are displayed as zero.

padZeros

boolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Positioning (2)
anchor

point. Default value: \(\left( 0, 0 \right)\). Coordinates of the anchor point used to position this component on a graph.

positionFromAnchor

keyword. Where this component sits relative to its anchor point.

ValueDescription
upperRightPlace the component above and to the right of the anchor point.
upperLeftPlace the component above and to the left of the anchor point.
lowerRightPlace the component below and to the right of the anchor point.
lowerLeftPlace the component below and to the left of the anchor point.
topPlace the component directly above the anchor point.
bottomPlace the component directly below the anchor point.
leftPlace the component directly to the left of the anchor point.
rightPlace the component directly to the right of the anchor point.
center (default)Center the component on the anchor point.
Other (15)
assumptions

math. Default value: \(_\). Assumptions applied when simplifying or comparing.

createIntervals

boolean. Default value: false. Whether range expressions are interpreted as intervals.

createVectors

boolean. Default value: false. Whether tuple-like expressions are interpreted as vectors.

displayBlanks

boolean. Default value: true. Whether blanks (placeholders) are visibly rendered.

draggable

boolean. Default value: true. Whether the math component can be dragged on a graph.

expand

boolean. Default value: false. Whether to expand the expression.

functionSymbols

textList. Default value: ["f","g"]. Symbols treated as function names when parsing.

layer

number. Default value: 0. Z-order layer index when shown on a graph.

number. Default value: 0. Lower bound used by the operator.

parseScientificNotation

boolean. Default value: false. Whether to parse expressions like 1e3 as scientific notation.

referencesAreFunctionSymbols

reference. References whose names should be treated as function symbols when parsing.

renderMode

text. Default value: inline. How the math is rendered (e.g. "inline", "display").

splitSymbols

boolean. Default value: true. Whether multi-character symbols are split into a product of variables.

unordered

boolean. Default value: false. Whether tuple- or list-like math expressions should be treated as unordered for comparison.

number. Default value: 1. Upper bound used by the operator.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <wrapNumberPeriodic name="w">

Highlighted (3)
$w.displayDigits

integer. Number of significant digits to display when rendering this number.

$w.format

text. Input format.

$w.simplify

text. Level of simplification applied to the expression.

Number display (5)
$w.avoidScientificNotation

boolean. Whether to render numbers in full decimal form rather than scientific notation.

$w.displayDecimals

integer. Number of decimal places to display when rendering this number.

$w.displayDigits

integer. Number of significant digits to display when rendering this number.

$w.displaySmallAsZero

number. Threshold below which numbers are displayed as zero.

$w.padZeros

boolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Positioning (2)
$w.anchor

point. The coordinates where this component is anchored on the graph.

$w.positionFromAnchor

text. Where this component sits relative to its anchor point.

Other (40)
$w.assumptions

math. Assumptions applied when simplifying or comparing.

$w.backgroundColor

text. Human-readable name for this component's background color, derived from the active style and theme.

$w.columns

[ math ]. The matrix's entries grouped by column.

$w.createIntervals

boolean. Whether range expressions are interpreted as intervals.

$w.createVectors

boolean. Whether tuple-like expressions are interpreted as vectors.

$w.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$w.displayBlanks

boolean. Whether blanks (placeholders) are visibly rendered.

$w.draggable

boolean. Whether the math component can be dragged on a graph.

$w.expand

boolean. Whether to expand the expression.

$w.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$w.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$w.functionSymbols

textList. Symbols treated as function names when parsing.

$w.hidden

boolean. Whether this component is hidden from the rendered output.

$w.isNumber

boolean. Whether the expression evaluates to a finite number.

$w.isNumeric

boolean. Whether the expression evaluates to any number (including infinities).

$w.latex

latex. The expression rendered as a LaTeX string.

$w.layer

number. Z-order layer index when shown on a graph.

$w.list

[ math ]. The math expression interpreted as a list (its elements).

$w.lowerValue

number. Lower bound used by the operator.

$w.matrix

[ math ]. The math expression interpreted as a matrix (its entries by row and column).

$w.matrixSize

numberList. The size of the math expression as a matrix, as a [numRows, numColumns] list.

$w.number

number. The numeric value of the expression (NaN if not a number).

$w.numColumns

integer. The number of columns when the math expression is interpreted as a matrix.

$w.numDimensions

integer. The number of dimensions if the math expression is interpreted as a vector or matrix.

$w.numListItems

integer. The number of items when the math expression is interpreted as a list.

$w.numRows

integer. The number of rows when the math expression is interpreted as a matrix.

$w.parseScientificNotation

boolean. Whether to parse expressions like 1e3 as scientific notation.

$w.renderMode

text. How the math is rendered (e.g. "inline", "display").

$w.rows

[ math ]. The matrix's entries grouped by row.

$w.splitSymbols

boolean. Whether multi-character symbols are split into a product of variables.

$w.text

text. The expression rendered as a plain text string.

$w.textColor

text. Human-readable name for this component's text color, derived from the active style and theme.

$w.textStyleDescription

text. Human-readable description of this component's text styling (color and any background color).

$w.unordered

boolean. Whether list-like values are treated as unordered.

$w.upperValue

number. Upper bound used by the operator.

$w.value

wrapNumberPeriodic. The math expression value.

$w.vector

[ math ]. The math expression interpreted as a vector (its components).

$w.x

math. The first component of the math expression when interpreted as a vector.

$w.y

math. The second component of the math expression when interpreted as a vector.

$w.z

math. The third component of the math expression when interpreted as a vector.

Common to all components (4)
$w.doenetML

text. The DoenetML source code that produced this component.

$w.hide

boolean. Whether to hide this component from the rendered output.

$w.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$w.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <wrapNumberPeriodic> with default bounds

The default lowerValue for <wrapNumberPeriodic> is 0, and the default upperValue is 1.


Example: <wrapNumberPeriodic> of user-input

The <wrapNumberPeriodic> component is applied to a <mathInput/>

Attribute Examples

Attribute Example: lowerValue, upperValue

Use the lowerValue and upperValue attributes to modify the default bounds of <wrapNumberPeriodic>. The default lowerValue is 0 and the default upperValue is 1.