Skip to content

Commit

Permalink
feat: [+] #66 math functions (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizalo authored Jul 13, 2022
1 parent e9e0f6c commit 9955ab6
Show file tree
Hide file tree
Showing 17 changed files with 1,246 additions and 71 deletions.
12 changes: 12 additions & 0 deletions core/src/main/scala/doric/syntax/IntegralType.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package doric
package syntax

trait IntegralType[T]

object IntegralType {
def apply[T]: IntegralType[T] = new IntegralType[T] {}

implicit val integralInt: IntegralType[Int] = IntegralType[Int]

implicit val integralLong: IntegralType[Long] = IntegralType[Long]
}
14 changes: 14 additions & 0 deletions core/src/main/scala/doric/syntax/NumWithDecimalsType.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package doric
package syntax

trait NumWithDecimalsType[T]

object NumWithDecimalsType {
def apply[T]: NumWithDecimalsType[T] = new NumWithDecimalsType[T] {}

implicit val decimalsDouble: NumWithDecimalsType[Double] =
NumWithDecimalsType[Double]

implicit val decimalsFloat: NumWithDecimalsType[Float] =
NumWithDecimalsType[Float]
}
Loading

0 comments on commit 9955ab6

Please sign in to comment.