Equal Numbers: Difference between revisions
mNo edit summary |
-u ndefined- (talk | contribs) m (Add information, adapted from old wiki article, and Related section) |
||
Line 22: | Line 22: | ||
[[File:precise-equals.jpg|thumb|none|Does not have the same issue as the example above]] | [[File:precise-equals.jpg|thumb|none|Does not have the same issue as the example above]] | ||
If one of the inputs are <code>NaN</code> or <code>inf</code> the block returns <code>False</code> regardless of sameness. | |||
== Related == | |||
* [[Equal Vectors]] | |||
* [[Equal Truths]] | |||
[[Category:Blocks]] | [[Category:Blocks]] |
Revision as of 16:30, 27 June 2024
Equal Numbers
Type | Script block |
Collider | None |
Folder | Math |
Ports | |
---|---|
Inputs | Num1 Num2 |
Outputs | Num1 = Num2 |
Outputs True
if both number inputs are equal, and false if they are not.

Notes
The numbers do not have to be actually equal to be considered equal, they have to be close enough.

If high precision is required, the following script can be used:

If one of the inputs are NaN
or inf
the block returns False
regardless of sameness.