Swiftpack.co -  Package - gabrieloc/Vectorizable
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
gabrieloc/Vectorizable
Adapters and utilities for treating CG types as generic k-dimensional vectors.
.package(url: "https://github.com/gabrieloc/Vectorizable.git", from: "0.2.1")

Vectorizable

Adapters and utilities for treating CG types as generic k-dimensional vectors.

Examples

Multiplying a CGPoint by a CGSize

let point = CGPoint(x: 1, y: 2) * CGSize(width: 3, height: 4) // CGPoint x: 3, y: 8

Adding a CGPoint to a CGSize

let size = CGSize(width: 2, height: 2) * CGPoint.one // CGSize w: 2, h: 2

GitHub

link
Stars: 0
Last commit: 6 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco