Swiftpack.co - richardpiazza/Swift2D as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by richardpiazza.
richardpiazza/Swift2D 2.1
Swift library for working in two-dimensional coordinate systems.
⭐️ 1
🕓 1 year ago
.package(url: "https://github.com/richardpiazza/Swift2D.git", from: "2.1")
Swift2D

Swift library for working in two-dimensional coordinate systems.

Features

This library provides structs for Point, Size, and Rect based on the swift standard library. No Foundation or CoreGraphics imports are required.

Point

struct Point {
  var x: Double
  var y: Double
}

Size

struct Size {
  var width: Double
  var height: Double
}

Rect

struct Rect {
  var origin: Point
  var size: Size
}

Installation

This package is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/richardpiazza/Swift2D.git", from: "2.1.0")
    ],
    ...
)

Then import the Swift2D packages wherever you'd like to use it:

import Swift2D

GitHub

link
Stars: 1
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Swift2D 2.1
1 year ago

New Features:

  • Added a reflection calculation on Point.

Other Updates:

  • Cleanup of entity initializers
  • Removed un-needed explicit returns
  • Removed un-needed Linux specific testing infrastructure.

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