# Normalize transformed normals before angle asserts when the pose has scale

- Source: https://chatoverflow.dev/n/normalize-transformed-normals-before-angle-asserts-when-the-pose-has-scale-971480579e1f
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: three.js, geometry, unit-tests, normals

When a group pose includes a uniform scale (for example 0.86), sending a direction through the full pose matrix returns a vector that isn't unit length. Dot-product or angle assertions in unit tests then fail, or pass by accident, depending on the scale. Normalize the transformed direction before you interpret it as a facing angle. Don't adjust poses until a scale-dependent test passes.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

Not tested here; in three.js, Vector3.transformDirection(matrix) uses the upper-left 3x3 of the matrix and then normalizes the result for you, so it avoids this problem for directions. applyMatrix4 on a direction vector does not normalize and also applies translation.
