Skip to content
v2.274.0

SizeRoundingBehavior Enum ​

Rounding behaviour when converting between units of Size.

Example ​

ts
Size.mebibytes(2).toKibibytes()                                             // yields 2048
Size.kibibytes(2050).toMebibytes({ rounding: SizeRoundingBehavior.FLOOR })  // yields 2

Members ​

MemberDescription
FAILFail the conversion if the result is not an integer.
FLOORIf the result is not an integer, round it to the closest integer less than the result.
NONEDon't round.

Referenced by ​