Skip to content

IsAlmost

Name Mandatory Description Default Type
⬅️ Input The input can be of any number type or a sequence of such types. FloatFloat2Float3Float4IntInt2Int3Int4Int8Int16[Any]
Output ➡️ true if the input is almost equal to the given value; otherwise, false. Bool
Value No The value to test against for almost equality. none FloatFloat2Float3Float4IntInt2Int3Int4Int8Int16[Any]
Threshold No The smallest difference to be considered equal. Should be greater than zero. 1.19209e-07 FloatInt

Checks whether the input is almost equal to a given value.

Examples

1
2
3
4
5
6
7
8
; integer comparison
199 | Math.Add(300) | IsAlmost(500 Threshold: 1) | Assert.Is(true Break: true)

; float comparison
4.0 | IsAlmost(3.9999 Threshold: 0.001) | Assert.Is(true Break: true)

; sequence comparison
[1 2 3.14] | IsAlmost([1 2 3.14]) | Assert.Is(true Break: true)