Conformance Examples 0.1.0 — Transforms: transform-round¶
round-half-rounds-up¶
A positive half rounds away from zero via {{ n | round }}.
Template
Context
Output
round-negative-half-rounds-away¶
A negative half rounds away from zero.
Template
Context
Output
round-below-half-rounds-down¶
A value below the half rounds down.
Template
Context
Output
round-integer-unchanged¶
round of an integer is unchanged.
Template
Context
Output
round-one-decimal-place¶
round with a places argument keeps that many decimals via {{ n | round: 1 }}.
Template
Context
Output
round-two-decimal-places¶
round with two decimal places.
Template
Context
Output
round-non-numeric-input-is-null¶
A non-numeric input is a soft failure, so round yields null.
Template
Context
Output
round-negative-places-is-null¶
A negative places argument is a soft failure, so round yields null.
Template
Context
Output
round-non-integer-places-is-null¶
A non-integer places argument is a soft failure, so round yields null.
Template
Context
Output
Source fixture: transforms/transform-round.json