- Source: src/math/fuzzy/index.js (Line 7)
Methods
-
<static> Ceil(value [, epsilon])
-
Calculate the fuzzy ceiling of the given value.
Parameters:
Name Type Argument Default Description value
number The value.
epsilon
number <optional>
0.0001 The epsilon.
- Since: 3.0.0
- Source: src/math/fuzzy/Ceil.js (Line 7)
Returns:
The fuzzy ceiling of the value.
- Type
- number
-
<static> Equal(a, b [, epsilon])
-
Check whether the given values are fuzzily equal.
Two numbers are fuzzily equal if their difference is less than
epsilon
.Parameters:
Name Type Argument Default Description a
number The first value.
b
number The second value.
epsilon
number <optional>
0.0001 The epsilon.
- Since: 3.0.0
- Source: src/math/fuzzy/Equal.js (Line 7)
Returns:
true
if the values are fuzzily equal, otherwisefalse
.- Type
- boolean
-
<static> Floor(value [, epsilon])
-
Calculate the fuzzy floor of the given value.
Parameters:
Name Type Argument Default Description value
number The value.
epsilon
number <optional>
0.0001 The epsilon.
- Since: 3.0.0
- Source: src/math/fuzzy/Floor.js (Line 7)
Returns:
The floor of the value.
- Type
- number
-
<static> GreaterThan(a, b [, epsilon])
-
Check whether
a
is fuzzily greater thanb
.a
is fuzzily greater thanb
if it is more thanb - epsilon
.Parameters:
Name Type Argument Default Description a
number The first value.
b
number The second value.
epsilon
number <optional>
0.0001 The epsilon.
- Since: 3.0.0
- Source: src/math/fuzzy/GreaterThan.js (Line 7)
Returns:
true
ifa
is fuzzily greater than thanb
, otherwisefalse
.- Type
- boolean
-
<static> LessThan(a, b [, epsilon])
-
Check whether
a
is fuzzily less thanb
.a
is fuzzily less thanb
if it is less thanb + epsilon
.Parameters:
Name Type Argument Default Description a
number The first value.
b
number The second value.
epsilon
number <optional>
0.0001 The epsilon.
- Since: 3.0.0
- Source: src/math/fuzzy/LessThan.js (Line 7)
Returns:
true
ifa
is fuzzily less thanb
, otherwisefalse
.- Type
- boolean