Vector2Signed

public protocol Vector2Signed : Vector2Type, VectorSigned where Self.SubVector3 : VectorSigned

Protocol for 2D vector types where the components are signed numbers.

  • Makes this Vector perpendicular to its current position relative to the origin. This alters the vector instance.

    Declaration

    Swift

    mutating func formPerpendicular()
  • Returns a Vector perpendicular to this Vector relative to the origin

    Declaration

    Swift

    func perpendicular() -> Self
  • Returns a vector that represents this vector’s point, rotated 90º counter clockwise relative to the origin.

    Declaration

    Swift

    func leftRotated() -> Self
  • Rotates this vector 90º counter clockwise relative to the origin. This alters the vector instance.

    Declaration

    Swift

    mutating func formLeftRotated()
  • Returns a vector that represents this vector’s point, rotated 90º clockwise clockwise relative to the origin.

    Declaration

    Swift

    func rightRotated() -> Self
  • Rotates this vector 90º clockwise relative to the origin. This alters the vector instance.

    Declaration

    Swift

    mutating func formRightRotated()