Tolerance

object Tolerance extends Tolerance

Companion object to trait Tolerance that facilitates the importing of Tolerance members as an alternative to mixing it in. One use case is to import Tolerance members so you can use them in the Scala interpreter:

$ scala -classpath scalactic.jar
Welcome to Scala 2.13.6 (OpenJDK 64-Bit Server VM, Java yyy).
Type in expressions for evaluation. Or try :help.

scala> import org.scalactic._
import org.scalactic._

scala> import Tolerance._
import Tolerance._

scala> 1.0 +- 0.1
res0: org.scalactic.TripleEqualsSupport.Spread[Double] = Spread(1.0,0.1)
Companion:
class
Source:
Tolerance.scala
trait Tolerance
class Object
trait Matchable
class Any

Type members

Inherited 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

Inherited from:
Tolerance
Source:
Tolerance.scala

Implicits

Inherited 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.

Inherited from:
Tolerance
Source:
Tolerance.scala