tolassert

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package tolassert provides functions for asserting the equality of numbers with tolerance (in other words, it checks whether numbers are about equal).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T num.Float](t assert.TestingT, expected T, actual T, msgAndArgs ...any) bool

Equal asserts that the given two numbers are about equal to each other, using a default tolerance of 0.001.

func EqualTol

func EqualTol[T num.Float](t assert.TestingT, expected T, actual, tolerance T, msgAndArgs ...any) bool

EqualTol asserts that the given two numbers are about equal to each other, using the given tolerance value.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL