BezierPointType

public protocol BezierPointType : AdditiveArithmetic

A protocol for points in Bézier curves.

  • The scalar type for this Bézier point.

    Declaration

    Swift

    associatedtype Scalar : FloatingPoint
  • magnitude Default implementation

    Gets the magnitude of this Bézier point, or its absolute length from origin.

    Default Implementation

    Declaration

    Swift

    var magnitude: Scalar { get }
  • magnitudeSquared Default implementation

    Gets the magnitude squared of this Bézier point, or its absolute length from origin squared.

    Default Implementation

    Declaration

    Swift

    var magnitudeSquared: Scalar { get }
  • Linearly interpolates between self and end by a given factor.

    Declaration

    Swift

    func lerp(to end: Self, factor: Double) -> Self
  • distanceSquared(to:) Default implementation

    Returns the distance squared from this point to another.

    Default Implementation

    Declaration

    Swift

    func distanceSquared(to other: Self) -> Scalar
  • distance(to:) Default implementation

    Returns the distance from this point to another.

    Default Implementation

    Declaration

    Swift

    func distance(to other: Self) -> Scalar
  • Returns the dot product of this Bézier point with another point.

    Declaration

    Swift

    func dot(_ other: Self) -> Scalar
  • Negates the value of this point.

    Declaration

    Swift

    prefix static func - (value: Self) -> Self
  • Standard point-wise addition operation.

    Declaration

    Swift

    static func + (lhs: Self, rhs: Self) -> Self
  • Standard point-wise subtraction operation.

    Declaration

    Swift

    static func - (lhs: Self, rhs: Self) -> Self
  • Standard point-wise multiplication operation.

    Declaration

    Swift

    static func * (lhs: Self, rhs: Self) -> Self
  • Standard point-wise division operation.

    Declaration

    Swift

    static func / (lhs: Self, rhs: Self) -> Self
  • Multiplies this Bézier point type by a given scalar value.

    Declaration

    Swift

    static func * (lhs: Self, rhs: Scalar) -> Self
  • Multiplies this Bézier point type by a given scalar value.

    Declaration

    Swift

    static func * (lhs: Scalar, rhs: Self) -> Self
  • Divides this Bézier point type by a given scalar value.

    Declaration

    Swift

    static func / (lhs: Self, rhs: Scalar) -> Self
  • Returns true iff all components of lhs compare >= to rhs.

    Declaration

    Swift

    static func >= (lhs: Self, rhs: Self) -> Bool
  • Returns true iff all components of lhs compare > to rhs.

    Declaration

    Swift

    static func > (lhs: Self, rhs: Self) -> Bool
  • Returns true iff all components of lhs compare < to rhs.

    Declaration

    Swift

    static func < (lhs: Self, rhs: Self) -> Bool
  • Returns true iff all components of lhs compare <= to rhs.

    Declaration

    Swift

    static func <= (lhs: Self, rhs: Self) -> Bool
  • Returns a new point type where each component is the minimal component between v1 and v2.

    Declaration

    Swift

    static func pointwiseMin(_ v1: Self, _ v2: Self) -> Self
  • Returns a new point type where each component is the maximal component between v1 and v2.

    Declaration

    Swift

    static func pointwiseMax(_ v1: Self, _ v2: Self) -> Self