VectorType
public protocol VectorType : AdditiveArithmetic
An value that can be used with ×(:) and ÷(::) in conjunction with a scalar.
Conformance Requirements:
AdditiveArithmeticstatic func ×= (lhs: inout Self, rhs: Scalar)static func ÷= (lhs: inout Self, rhs: Scalar)
-
×(_:_:)Default implementationReturns the product of the left times the right.
Mutating variant
×=
Default Implementation
Returns the product of the left times the right.
Mutating variant
×=
Returns the product of the left times the right.
Declaration
Swift
static func × (lhs: Self, rhs: Scalar) -> SelfParameters
lhsA value.
rhsA scalar coefficient.
-
Returns the product of the left times the right.
Declaration
Swift
static func × (lhs: Scalar, rhs: Self) -> SelfParameters
lhsA scalar coefficient.
rhsA value.
-
Modifies the left by multiplication with the right.
Nonmutating variant
×
Declaration
Swift
static func ×= (lhs: inout Self, rhs: Scalar)Parameters
lhsThe value to modify.
rhsThe scalar coefficient by which to multiply.
-
Returns the quotient of the left divided by the right.
Mutating variant
×
Recommended over
/
Declaration
Swift
static func ÷ (lhs: Self, rhs: Scalar) -> SelfParameters
lhsThe dividend.
rhsThe divisor.
-
Modifies the left by dividing it by the right.
Nonmutating variant
÷
Recommended over
/=
Declaration
Swift
static func ÷= (lhs: inout Self, rhs: Scalar)Parameters
lhsThe value to modify.
rhsThe divisor.
View on GitHub
VectorType Protocol Reference