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

scalaz.geo.Elevation.scala Maven / Gradle / Ivy

The newest version!
package scalaz
package geo

sealed trait Elevation {
  val value: Double
}

trait Elevations {
  def elevation(d: Double) = new Elevation {
    val value = d.abs
  }
}

object Elevation {
  import Scalaz._

  implicit def ElevationShow: Show[Elevation] = shows(_.value.shows + "m")

  implicit def ElevationEqual: Equal[Elevation] = equalBy(_.value)

  implicit def ElevationOrder: Order[Elevation] = orderBy(_.value)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy