FloatingPoint
protocol FloatingPoint : Comparable, AbsoluteValuable, SignedNumber, Strideable
-
Mechanica
Returns a
new
roundedFloatingPoint
to specified number of decimalplaces
.Declaration
Swift
public final func rounded(to decimalPlaces: Int) -> Self
-
Mechanica
Rounds
self
to specified number of decimalplaces
.Declaration
Swift
public mutating func round(to decimalPlaces: Int)
-
Mechanica
Returns a
new
ceiledFloatingPoint
to specified number of decimalplaces
.Declaration
Swift
public final func ceiled(to decimalPlaces: Int) -> Self
-
Mechanica
Ceils
self
to specified number of decimalplaces
.Declaration
Swift
public mutating func ceil(to decimalPlaces: Int)
-
Mechanica
Returns a
new
flooredFloatingPoint
to specified number of decimalplaces
.Declaration
Swift
public final func floored(to decimalPlaces: Int) -> Self
-
Mechanica
Floors
self
to specified number of decimalplaces
.Declaration
Swift
public mutating func floor(to decimalPlaces: Int)