Pudu programming language
Menu
API reference

Std.Test.closeTo

1 declaration

fn

closeTo: Str -> Decimal -> Decimal -> Decimal -> Std.Test.Check

This is a callable function.

What it does

A check that holds when two exact numbers differ by no more than a

tolerance.

A Decimal, because the reason to compare within a tolerance is almost

always a figure a float would already have got wrong.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.TestSearch related declarations