trait Tolerance extends AnyRef
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)
- Source
- Tolerance.scala
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Tolerance
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- final class PlusOrMinusWrapper[T] extends AnyRef
Wrapper class with a
+-
method that, given aNumeric
argument, returns aSpread
.
Value Members
- implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]
Implicitly converts an object of a
Numeric
type to aPlusOrMinusWrapper
, to enable a+-
method to be invoked on that object.