CoreGeometry is a set of Core Graphics structs extensions and utility functions. It also offers a set of extensions and utility fonction for some Swift's numeric type.
- Numeric types additions
dependencies: [ // Dependencies declare other packages that this package depends on. .package(url: "https://gitlab.com/Pyroh/CoreGeometry.git", .upToNextMajor(from: "4.0.0")), ],
Numeric types additions
CoreGeometry adds a new postfixed operator
° to both
FloatIntegerLiteral. What it does is to consider the literal as an angle expressed in degrees and convert it in radian.
As a result we can assert that :
45° == CGFloat.pi / 4 90.0° == CGFloat.pi / 2
It helps you to express angles in degree and pass them directly to CoreGraphics functions.