
com.wavesenterprise.utils.NumberUtils.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of we-models Show documentation
Show all versions of we-models Show documentation
Library for Waves Enterprise blockchain platform
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