Decimal
Attributes
- Source
- Decimal.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Decimal.type
Members list
Type members
Classlikes
Attributes
- Source
- Decimal.scala
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
Types
Attributes
- Source
- Decimal.scala
Value members
Concrete methods
Create a Decimal from an Int value.
Create a Decimal from an Int value.
The function takes evidence that requires there to be enough precision to represent all Int values.
Attributes
- Source
- Decimal.scala
Create a Decimal from a Long value.
Create a Decimal from a Long value.
The function takes evidence that requires there to be enough precision to represent all Long values.
Attributes
- Source
- Decimal.scala
Construct a Decimal from a Java BigDecimal.
Construct a Decimal from a Java BigDecimal.
Returns None if the required precision is not met and performs rounding if the BigDecimal has higher scale.
Attributes
- Source
- Decimal.scala
Construct a Decimal from a BigDecimal.
Construct a Decimal from a BigDecimal.
Returns None if the required precision is not met and performs rounding if the BigDecimal has higher scale.
Attributes
- Source
- Decimal.scala
Create a Decimal from a Byte value.
Create a Decimal from a Byte value.
The function takes evidence that requires there to be enough precision to represent all Byte values (which require at most 3 digits plus the scale).
Attributes
- Source
- Decimal.scala
Create a Decimal from a Short value.
Create a Decimal from a Short value.
The function takes evidence that requires there to be enough precision to represent all Short values (which require at most 5 digits plus the scale).
Attributes
- Source
- Decimal.scala
Construct a Decimal from a Float value.
Construct a Decimal from a Float value.
Returns None if the value is NaN or infinite, otherwise returns the closest Decimal representation.
Attributes
- Source
- Decimal.scala
Construct a Decimal from a Double value.
Construct a Decimal from a Double value.
Returns None if the value is NaN or infinite, otherwise returns the closest Decimal representation.
Attributes
- Source
- Decimal.scala
Concrete fields
Attributes
- Source
- Decimal.scala
Givens
Givens
Attributes
- Source
- Decimal.scala
Attributes
- Source
- Decimal.scala
Attributes
- Source
- Decimal.scala
Attributes
- Source
- Decimal.scala
Extensions
Extensions
Rounds the decimal to the nearest Int.
Rounds the decimal to the nearest Int.
Returns None if the value is out of bounds for a Int.
Attributes
- Source
- Decimal.scala
Rounds the decimal to the nearest long. Returns None if the value is out of bounds for a long.
Rounds the decimal to the nearest long. Returns None if the value is out of bounds for a long.
Attributes
- Source
- Decimal.scala
Converts the decimal into a BigDecimal.
Converts the decimal into a Double.
Converts the decimal into a Double.
Note: In some cases this conversion will lose precision.
Attributes
- Source
- Decimal.scala
Converts the decimal into a Float.
Converts the decimal into a Float.
Note: In some cases this conversion will lose precision.
Attributes
- Source
- Decimal.scala
Rounds the decimal to an Byte by truncating the value.
Rounds the decimal to an Byte by truncating the value.
Returns None if the value is out of bounds for a Int.
Attributes
- Source
- Decimal.scala
Rounds the decimal to an Int by truncating the value.
Rounds the decimal to an Int by truncating the value.
Returns None if the value is out of bounds for a Int.
Attributes
- Source
- Decimal.scala
Rounds the decimal to an Long by truncating the value.
Rounds the decimal to an Long by truncating the value.
Returns None if the value is out of bounds for a long.
Attributes
- Source
- Decimal.scala
Rounds the decimal to an Short by truncating the value.
Rounds the decimal to an Short by truncating the value.
Returns None if the value is out of bounds for a Short.
Attributes
- Source
- Decimal.scala
Widens the Decimal to a new precision and scale.
Converts the decimal to an Bytes if it is within the bounds of an Byte.
Converts the decimal to an Bytes if it is within the bounds of an Byte.
Attributes
- Source
- Decimal.scala
Converts the decimal to an Int if it is within the bounds of an Int.
Converts the decimal to an Int if it is within the bounds of an Int.
Attributes
- Source
- Decimal.scala
Converts the decimal to a Long if it is within the bounds of a Long.
Converts the decimal to a Long if it is within the bounds of a Long.
Attributes
- Source
- Decimal.scala
Converts the decimal to an Short if it is within the bounds of an Short.
Converts the decimal to an Short if it is within the bounds of an Short.
Attributes
- Source
- Decimal.scala
Converts the decimal to a Long that is statically know to be representable as a Long.
Converts the decimal to a Long that is statically know to be representable as a Long.
Attributes
- Source
- Decimal.scala