目录
目录README.md

CGExtender

Useful extensions and functions used with coregraphics types like CGFloat, CGPoint, and CGSize

Collision Functions

Checkout the collisions example project for how to make use of the functions in SwiftUI

  • Point/Line
  • Point/Circle
  • Point/Rectangle
  • Point/Polygon
  • Line/Line
  • Line/Rectangle
  • Line/Circle
  • Line/Polygon
  • Circle/Circle
  • Circle/Rectangle
  • Circle/Polygon
  • Rectangle/Rectangle
  • Rectangle/Polygon
  • Polygon/Polygon

CGPoint

  • VectorArithmetic Conformance
  • Random Value in range

CGSize

  • VectorArithmetic Conformance
  • Random Value in range

Clamping Functions

Clamps within range of two given values

Geometry Functions

  • atanP - function returns only positive values between [0, 2π]
  • calculateDirection -Calculates the direction between two points relative to the vector pointing in the trailing direction
  • project - Projects the point p onto the line segment defined by the points L1 and L2
  • calculateParameter - Projects the point p onto the vector defined by the points L1 and L2, uses the parametric form of the line segment from L1 to L2 to constrain the projected point to be on the line segment
  • distance - gets the distance between two points
关于
43.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号