Quaternion.opBinary

Binary operation between quaternion for "+" or "-"

  1. Quaternion!(CommonType!(T, S)) opBinary(Quaternion!S q)
    struct Quaternion(T)
    const
    Quaternion!(CommonType!(T, S))
    opBinary
    (
    string op
    S
    )
    if (
    op == "+" ||
    op == "-"
    )
    if (
    __traits(isArithmetic, T)
    )
  2. Quaternion!(CommonType!(T, S)) opBinary(Quaternion!S q)
  3. Quaternion!(CommonType!(T, S)) opBinary(S e)

Parameters

q Quaternion!S

target quaternion

Return Value

Type: Quaternion!(CommonType!(T, S))

calculated quaternion

Meta