LYGIA Shader Library

div (lygia/math/quat/div)

Quaternion division

Dependencies:

Use:

<QUAT> quatDiv(<QUAT> a, <QUAT> b)

Check it on Github



#ifndef FNC_QUATDIV
#define FNC_QUATDIV
QUAT quatDiv(QUAT q, float s) { return QUAT(q.xyz / s, q.w / s); }
#endif

Dependencies:

Use:

<QUAT> quatDiv(<QUAT> a, <QUAT> b)

Check it on Github



#ifndef FNC_QUATDIV
#define FNC_QUATDIV
QUAT quatDiv(QUAT q, float s) { return QUAT(q.xyz / s, q.w / s); }
#endif

Use:

<QUAT> quatDiv(<QUAT> a, <QUAT> b)

Check it on Github


fn quatDiv(q: vec4f, s: f32) -> vec4f { return vec4f(q.xyz / s, q.w / s); }

License

LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.

Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).

It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository