MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / copySign

Function copySign

Three.js/js/ThreeDebug.js:3601–3605  ·  view source on GitHub ↗
( a, b )

Source from the content-addressed store, hash-verified

3599 // Adapted from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
3600
3601 function copySign( a, b ) {
3602
3603 return b < 0 ? -Math.abs( a ) : Math.abs( a );
3604
3605 }
3606
3607 var absQ = Math.pow( m.determinant(), 1.0 / 3.0 );
3608 this.w = Math.sqrt( Math.max( 0, absQ + m.elements[0] + m.elements[5] + m.elements[10] ) ) / 2;

Callers 1

ThreeDebug.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected