Multiply 2 Quaternion (simd_quatd)?

Multiply 2 Quaternion (simd_quatd)?

ericdoleckiericdolecki Member Posts: 15
In the DataExample application, within the SensorDataCell Class, there is this code:

func update(quaternion q: Quaternion) {

        xValue?.text = Format.decimal(q.x)

        yValue?.text = Format.decimal(q.y)

        zValue?.text = Format.decimal(q.z)

        wValue?.text = Format.decimal(q.w)

        let qMap = Quaternion(ix: 1, iy: 0, iz: 0, r: 0)

        let qResult = q * qMap


In that project, I get no Errors or Warnings. However, in my own project, I am trying to do similar, but I get an error with the last line:

Binary operator '*' cannot be applied to two 'Quaternion' (aka 'simd_quatd') operands

How is the DataExample able to do this without an error? DataExample and my project are set to Swift 5 as language.


Sign In or Register to comment.