There are two significant API changes to the Complex module in this release:
-
The
unsafeLengthSquared
property has been renamedlengthSquared
, because--while it can overflow or underflow--the result is always well-defined, and therefore does not lead to memory unsafety. The old property is still present, marked unavailable, so you should get a useful renaming message from the compiler or your IDE. The old property will be removed after a period of time. -
The
Complex(length:phase:)
initializer has been made non-optional. Instead it is now a precondition that thelength
must be either zero or infinite if phase is not finite. Updating code to account for this change should be quite straightforward, because you are unlikely to have been using the paths that could returnnil
previously. If you have any questions, please ask for assistance in this thread.