spheretoscreen - screentosphere

  • I'm converting the hotspot coordinates to screen coordinates and then I want to get the spherical coordinates back to the h v variables. But if the hotspot has ath=0 and atv=0, then I get the wrong result. What am I doing wrong? *confused*


    When I rotate the panorama the converted v h values are output
    example

  • Hi,

    works correctly as it should.

    What do you expect?

    Or are you confused by the near zero numbers in exponential notation? (e.g. values like 1.2345e-9)

    Due rounding errors the result can't be exactly 0/0 again, but they are very near to 0.

    Maybe add a rounding like this, then the results should be always 0.0.

    Code
    calc(layer[info].html, ' h=' + roundval(h,1) + '[br] v=' + roundval(v,1) );

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!