All Downloads are FREE. Search and download functionalities are using the official Maven repository.

au.id.tmm.githubprlanguagedetection.languagedetection.model.Fraction.scala Maven / Gradle / Ivy

The newest version!
package au.id.tmm.githubprlanguagedetection.languagedetection.model

import cats.syntax.invariant._

final case class Fraction(asDouble: Double) extends AnyVal

object Fraction {
  implicit val ordering: Ordering[Fraction] = Ordering[Double].imap[Fraction](Fraction.apply)(_.asDouble)
  implicit def orderingOps(fraction: Fraction): ordering.OrderingOps = ordering.mkOrderingOps(fraction)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy