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

com.wavesenterprise.utils.NumberUtils.scala Maven / Gradle / Ivy

There is a newer version: 1.16.0
Show newest version
package com.wavesenterprise.utils

import com.wavesenterprise.settings.Constants.UnitsInWest

import scala.util.Try

object NumberUtils {
  implicit class DoubleExt(val d: Double) extends AnyVal {
    def west: Long = (d * UnitsInWest).toLong
  }

  object ValidBigDecimal {
    def unapply(arg: String): Option[BigDecimal] = {
      Try(BigDecimal(arg)).toOption
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy