Post

Replies

Boosts

Views

Activity

Comment on Symbol missing when building in Xcode cloud with Xcode 16 beta and running on macOS 14.6
Thanks for the temp workaround. Just a heads up - that code has a bug when the number is negative. (-1.5).roundedDecimal(scale: 1) // returns 1.5 The fix is to wrap self in abs(self). extension Double { func roundedDecimal(scale: Int = 0, rule: FloatingPointRoundingRule = .toNearestOrEven) -> Decimal { let significand = Decimal((abs(self) * pow(10, Double(scale))).rounded(rule)) return Decimal(sign: self.sign, exponent: -scale, significand: significand) } }
Sep ’24