CGVector3
public struct CGVector3
extension CGVector3: ExpressibleByArrayLiteral
extension CGVector3: Interpolatable
extension CGVector3: Equatable
This whole file exists basically because SIMD doesn’t support CGFloat and without this file, you’d be doing things like transform.position.x = Double(value)
:(
So everything here just bridges CGFloats to Doubles and uses their simd equivalents.
Technically CGFloat can be Float or Double (32bit or 64bit) but everything is 64bit nowadays so, if it’s really necessary it can be added later.
-
No overview available.
Declaration
Swift
public var x: CGFloat { get set }
-
No overview available.
Declaration
Swift
public var y: CGFloat { get set }
-
No overview available.
Declaration
Swift
public var z: CGFloat { get set }
-
No overview available.
Declaration
Swift
public init(x: CGFloat = 0.0, y: CGFloat = 0.0, z: CGFloat = 0.0)
-
No overview available.
Declaration
Swift
public init(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0)
-
No overview available.
Declaration
Swift
public init(x: Float = 0.0, y: CGFloat = 0.0, z: CGFloat = 0.0)
-
No overview available.
Declaration
Swift
public init(_ vector: simd_double3)
-
No overview available.
Declaration
Swift
public init(_ vector: simd_float3)
-
No overview available.
Declaration
Swift
var xy: CGFloat { get set }
-
No overview available.
Declaration
Swift
var xz: CGFloat { get set }
-
No overview available.
Declaration
Swift
var yz: CGFloat { get set }
-
No overview available.
Declaration
Swift
init(xy: CGFloat = 0.0, xz: CGFloat = 0.0, yz: CGFloat = 0.0)
-
No overview available.
Declaration
Swift
init(xy: Double = 0.0, xz: Double = 0.0, yz: Double = 0.0)
-
No overview available.
Declaration
Swift
init(xy: Float = 0.0, xz: Float = 0.0, yz: Float = 0.0)
-
Declaration
Swift
public init(arrayLiteral elements: CGFloat...)
-
No overview available.
Declaration
Swift
public init(_ x: CGFloat, _ y: CGFloat, _ z: CGFloat)
-
Declaration
Swift
public func lerp(to: CGVector3, fraction: CGFloat) -> CGVector3
-
Declaration
Swift
public static func == (lhs: `Self`, rhs: `Self`) -> Bool