Replaces this value with its additive inverse.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Discussion
The result is always exact. This example uses the negate()
method to negate the value of the variable x
:
Replaces this value with its additive inverse.
SDK
Framework
The result is always exact. This example uses the negate()
method to negate the value of the variable x
:
Perform arithmetic and bitwise operations or compare values.
func adding Product(Double, Double) -> Double
Returns the result of adding the product of the two given values to this value, computed without intermediate rounding.
func add Product(Double, Double)
Adds the product of the two given values to this value in place, computed without intermediate rounding.
func square Root() -> Double
Returns the square root of the value, rounded to a representable value.
func form Square Root()
Replaces this value with its square root, rounded to a representable value.
func remainder(dividing By: Double) -> Double
Returns the remainder of this value divided by the given value.
func form Remainder(dividing By: Double)
Replaces this value with the remainder of itself divided by the given value.
func truncating Remainder(dividing By: Double) -> Double
Returns the remainder of this value divided by the given value using truncating division.
func form Truncating Remainder(dividing By: Double)
Replaces this value with the remainder of itself divided by the given value using truncating division.