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.
- Installation
- Numeric types additions
CGPoint
additionsCGVector
additionCGRect
additions- Contribute
- License
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://gitlab.com/Pyroh/CoreGeometry.git", .upToNextMajor(from: "4.0.0")),
],
CoreGeometry adds a new postfixed operator °
to both IntegerLiteralType
and 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.
WIP
WIP
WIP
WIP
See LICENSE