Loading ...
Sorry, an error occurred while loading the content.

Safari image coordinate, FireFox precision, and decimals.

Expand Messages
  • Sean M Montague
    I m playing
    Message 1 of 2 , Dec 9, 2007
    • 0 Attachment
      <image shape-rendering='crispEdges' xlink:href="myBgImage.png"
      x="-88.0224609375" y="-44.4965053311" width="0.0439453125"
      height="0.031337467362"/>

      I'm playing with using decimal degrees as my coordinate system, and it
      appears that Safari doesn't like decimals in the x and y coords. Is this
      a bug, or am I missing something?

      Also related to my decimal degrees, does FireFox have a lower level of
      precision than the Adobe Viewer? Using the above type of coordinates
      seems to leave large gaps between my images, indicating that the
      decimals are being rounded off.

      Thanks!
      Sean
    • Charles McCathieNevile
      On Sun, 09 Dec 2007 21:51:00 +0100, Sean M Montague ... Sounds like a bug. ... Computers generally round decimals (one of the things that ECMAScript 4 will
      Message 2 of 2 , Dec 9, 2007
      • 0 Attachment
        On Sun, 09 Dec 2007 21:51:00 +0100, Sean M Montague
        <scene@...> wrote:

        > <image shape-rendering='crispEdges' xlink:href="myBgImage.png"
        > x="-88.0224609375" y="-44.4965053311" width="0.0439453125"
        > height="0.031337467362"/>
        >
        > I'm playing with using decimal degrees as my coordinate system, and it
        > appears that Safari doesn't like decimals in the x and y coords. Is this
        > a bug, or am I missing something?

        Sounds like a bug.

        > Also related to my decimal degrees, does FireFox have a lower level of
        > precision than the Adobe Viewer? Using the above type of coordinates
        > seems to leave large gaps between my images, indicating that the
        > decimals are being rounded off.

        Computers generally round decimals (one of the things that ECMAScript 4
        will give is true decimal arithmetic). This means that, for example,
        javascript:alert(0.1 + 0.2); will actually give you 0.30000000000000004 -
        the length of your decimal will determine whether you run into these
        errors, so you might or might not be seeing that as the problem. (I don't
        know what Firefox uses internally, but you can pretty much bet it will be
        a floating point number of some kind - i.e. a fixed number of "safe"
        significant figures...)

        cheers

        Chaals

        --
        Charles McCathieNevile Opera Software, Standards Group
        je parle français -- hablo español -- jeg lærer norsk
        http://my.opera.com/chaals Try the Kestrel - Opera 9.5 alpha
      Your message has been successfully submitted and would be delivered to recipients shortly.