2019-01-08 10:15:26 8 Comments

I am having trouble understanding the semantics of some members of the XNA/Monogame `Quaternion`

class. The docs are not helpful, and tutorials trying to explain quaternions are using heavy math, which isn't helpful for me either, since I simply do not have proper background for that.

My main questions currently are:

Is there any difference between

`Multiply`

and`Concatenate`

?What is the exact difference between

`Inverse`

and`Negate`

?

### Related Questions

#### Sponsored Content

#### 1 Answered Questions

### [SOLVED] Monogame/XNA Hardware Instancing problem

**2017-04-14 13:33:08****Skye Maidstone****227**View**2**Score**1**Answer- Tags: xna monogame instancing

#### 0 Answered Questions

#### 0 Answered Questions

### Import Quaternions from a different coordinate system to perform an animation (DirectX to 3ds/Maya)

**2016-11-30 18:13:25****Seyren Windsor****129**View**1**Score**0**Answer- Tags: animation directx quaternion 3dsmax maya

#### 1 Answered Questions

#### 2 Answered Questions

#### 0 Answered Questions

### How to get correct quaternion value from real world to screen?

**2016-03-12 01:20:42****Ian****104**View**0**Score**0**Answer- Tags: mathematics quaternion glm

#### 1 Answered Questions

#### 3 Answered Questions

### [SOLVED] MonoGame performance better then XNA?

**2013-02-09 01:06:46****ares_games****4126**View**1**Score**3**Answer- Tags: xna xna-4.0 performance monogame

#### 1 Answered Questions

### [SOLVED] How do 2D art assets (eg. sprites) work?

**2012-02-19 02:36:11****null_pointer****1092**View**12**Score**1**Answer- Tags: xna graphics textures graphics-design

#### 1 Answered Questions

### [SOLVED] Quaternions and rotation around world axis

**2011-08-20 08:08:51****Kaj****5065**View**11**Score**1**Answer- Tags: quaternion

## 1 comments

## @Bálint 2019-01-08 13:34:56

There's minimal difference between concatenate and multiply,

`concatenate(a, b) = b * a`

Inverse and negate are different. Negate flips the signs, inverse returns \$q^{-1}\$ so that \$q * q^{-1} = identity = (1, 0, 0, 0)\$, the inverse of the quaternion \$(a, b, c, d)\$ is \$\frac{a -ib-jc-kd}{a^2+b^2+c^2+d^2}\$

## @DMGregory 2019-01-08 14:48:59

I'd expect

`Inverse({1/√2, 0, 0 1/√2})`

to yield`{-1/√2, 0, 0 1/√2}`

while`Negate`

would yield`{-1/√2, 0, 0 -1/√2}`

. These two rotations yield the same orientation, but the latter reaches it the long way rather than via the shortest angle.## @codymanix 2019-01-08 15:37:03

What is the semantic of normalizing a Quaternion, I understand that the components will divided by the length, but what happens to the rotation then?

## @Bálint 2019-01-08 15:50:29

@codymanix Nothing, but multiplying other quaternions with a normalized one won't change their length. This won't be guaranteed for a non-normalized one

## @Bálint 2019-01-08 15:54:56

@DMGregory Fixed

## @codymanix 2019-01-09 13:25:47

Does normalizing a Quaternion mean similar as make for example n*2*PI to 0.0 degrees in Euler angles? If this hasn't any drawbacks and does't affect rotation, is it recommended to normalize a Quaternion before persisting it (e.g. store into database)?

## @Bálint 2019-01-09 14:48:20

@codymanix quaternions are 4d numbers, so basically a more complicated vector. Multiplying two quaternions results in one with a length equal to the factor of the first two. Since gamedevs generally use floats and those are more precise when they're smaller, it's advised to either normalize quaternions or only use unit length ones when multiplying