Tolerance

org.scalactic.Tolerance
See theTolerance companion object
trait Tolerance

Trait containing an implicit conversion that adds a +- method to Numeric types, which enables spreads to be expressed in terms of a pivot and tolerance.

For example, the TripleEquals trait (and its type-checking siblings TypeCheckedTripleEquals and ConversionCheckedTripleEquals) enable you to write:

a === (1.0 +- 0.1)

Attributes

Companion
object
Source
Tolerance.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Tolerance.type

Members list

Type members

Classlikes

final class PlusOrMinusWrapper[T](pivot: T)(implicit evidence$1: Numeric[T])

Wrapper class with a +- method that, given a Numeric argument, returns a Spread.

Wrapper class with a +- method that, given a Numeric argument, returns a Spread.

Value parameters

tolerance

the tolerance with which to create (and return) a Spread

Attributes

Source
Tolerance.scala
Supertypes
class Object
trait Matchable
class Any

Implicits

Implicits

implicit def convertNumericToPlusOrMinusWrapper[T : Numeric](pivot: T): PlusOrMinusWrapper[T]

Implicitly converts an object of a Numeric type to a PlusOrMinusWrapper, to enable a +- method to be invoked on that object.

Implicitly converts an object of a Numeric type to a PlusOrMinusWrapper, to enable a +- method to be invoked on that object.

Attributes

Source
Tolerance.scala