Navigation

Operators and Keywords

Function List:

C++ API

Function File: set (q)

Function File: set (q, "key", value, ...)

Function File: qret = set (q, "key", value, ...)

Set or modify properties of quaternion objects. If no return argument qret is specified, the modified quaternion object is stored in input argument q. set can handle multiple keys in one call: set (q, 'key1', val1, 'key2', val2, 'key3', val3). set (q) prints a list of the object's key names.

Keys

w
Assign real-valued array val to scalar part w of quaternion q.
x, y, z
Assign real-valued array val to component x, y or z of the vector part of quaternion q.
s
Assign scalar part of quaternion val to scalar part of quaternion q. The vector part of q is left untouched.
v
Assign vector part of quaternion val to vector part of quaternion q. The scalar part of q is left untouched.

Package: quaternion