Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
How can I get the rotateY value from martix?

I got rotateY throw this method,but how can I get rotateY from 0 to 360?

var _getTransform = function($element) {

var matrix = $element.css('transform'),
    rotateX = 0,
    rotateY = 0,
    rotateZ = 0;

if (matrix !== 'none') {

    // do some magic
    var values = matrix.split('(')[1].split(')')[0].split(','),
        pi = Math.PI,
        sinB = parseFloat(values[8]),
        b = Math.round(Math.asin(sinB) * 180 / pi),
        cosB = Math.cos(b * pi / 180),
        matrixVal10 = parseFloat(values[9]),
        a = Math.round(Math.asin(-matrixVal10 / cosB) * 180 / pi),
        matrixVal1 = parseFloat(values[0]),
        c = Math.round(Math.acos(matrixVal1 / cosB) * 180 / pi);

    rotateX = a;
    rotateY = b;
    rotateZ = c;

}

return {
    rotateX: rotateX,
    rotateY: rotateY,
    rotateZ: rotateZ
};

}

css: transform: rotateY(110deg) rotateX(10deg);

I got: rotateX:28 rotateY:68 rotateZ:156

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!