Last updated 2 years ago
ๅฎๆดๆฏๆดใๅ ๆธไน้คใ็ๅๅฎใ
.decimalPlaces() - ้ๅถๅฐๆธ้กฏ็คบไฝๆธใ
floating +โโจรท int - ่ Int ๅๅๅ้็ฎใ
// ๐ ฟ๏ธ FloatingPoint protocol FloatingPoint { // instance properties var sign: FloatingPointSign { get } var exponent: Self.Exponent { get } var significand: Self { get } // type properties static var radix: Int { get } }
Jesse โฉ
Floating-point Swift, ulp, and epsilon
Exploring Swiftโs numeric types and protocols โญ๏ธ (slides)
When should you use Decimal instead of Double?
Swift โฉ Numbers and Basic Values โฉ Numeric Protocols โฉ FloatingPoint
.squareRoot()
inherited by BinaryFloatingPoint.
๐ ฟ๏ธ Vector2D