Skip to content

Commit

Permalink
edit readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibClnt committed Jan 19, 2024
1 parent c8e38aa commit 55362b2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
providing use case presentation, a functional schema, instructions on how to run and test your application and the decisions made (libraries, data structure(s), algorithm, performance, ...).

# Energy Analysis Tool

## How to run & test
Expand Down
32 changes: 0 additions & 32 deletions src/main/scala/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,6 @@ object Types {
implicit val GWOrdering: Ordering[GW] = (x: GW, y: GW) => x.toFloat compare y.toFloat
}

object Consumption {
type kWh = Float
type MWh = Float
type GWh = Float

object kWh {
def apply(value: Float): kWh = value
def toMWh(value: kWh): MWh = value / 1000
def toGWh(value: kWh): GWh = value / 1000000
}

object MWh {
def apply(value: Float): MWh = value
def tokWh(value: MWh): kWh = value * 1000
def toGWh(value: MWh): GWh = value / 1000
}

object GWh {
def apply(value: Float): GWh = value
def tokWh(value: GWh): kWh = value * 1000000
def toMWh(value: GWh): MWh = value * 1000
}

given Conversion[Float, kWh] = kWh(_)
given Conversion[Float, MWh] = MWh(_)
given Conversion[Float, GWh] = GWh(_)

implicit val kWhOrdering: Ordering[kWh] = (x: kWh, y: kWh) => x.toFloat compare y.toFloat
implicit val MWhOrdering: Ordering[MWh] = (x: MWh, y: MWh) => x.toFloat compare y.toFloat
implicit val GWhOrdering: Ordering[GWh] = (x: GWh, y: GWh) => x.toFloat compare y.toFloat
}

object Temperature {
type Celsius = Float

Expand Down

0 comments on commit 55362b2

Please sign in to comment.