1890348863287943363, 1886572405176345062, 1885175713638076657, 1884282476195110998, 1881908248544166159, 1877208278632955949, 1876093937632600106,

This commit is contained in:
ed committed 2026-08-25 01:46:01 -04:00
1 parent aca7150c9e
commit 8bf65fca7b
23 files changed
+1178 -62

No files matched your search

@@ -0,0 +1,44 @@
---
title: "Comparing matrix to quaternion code:"
type: archive
source: twitter
source_url: "https://x.com/NOTimothyLottes/status/1885175713638076657"
author: "NOTimothyLottes"
handle: NOTimothyLottes
post_id: "1885175713638076657"
date: 2025-01-31
archived: 2026-08-25
draft: false
tags:
- archive
- twitter
- NOTimothyLottes
description: "Comparing matrix to quaternion code:"
in_reply_to: ""
---
## Source
- URL: https://x.com/NOTimothyLottes/status/1885175713638076657
- Author: NOTimothyLottes (@NOTimothyLottes)
- Posted: 2025-01-31 03:58:09
## Thread
**1/**
Comparing matrix to quaternion code:
(A.) https://d3cw3dd2w32x2b.cloudfront.net/wp-content/uploads/2015/01/matrix-to-quat.pdf
(B.) https://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm (Alternative Method)
A with conditional moves is probably faster on CPU
B probably faster on GPU? (sqrt = 4 clk, copysign=BFI)
Anything better than those?
![](https://pbs.twimg.com/media/Gil71jfXEAAhOJa?format=png&name=orig)
**2/**
The (B.) alternative method might be just 32 VALU clocks on AMD, wrote up the code below (but warning didn't test it yet).
![](https://pbs.twimg.com/media/GimC2pIXsAACvgi?format=png&name=orig)