Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117210

Point3D.angle() returns NaN for valid input due to calculation errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • 8
    • javafx
    • 8.0-graphics-scrum-b1274-x64

      Point3D.angle() is is NaN for the following points:
      Point3D [x = -0.8944271909999159, y = 0.0, z = 0.4472135954999579] and
      Point3D [x = -0.894427190999924, y = 4.061090000458082E-14, z = 0.4472135954999417]

      Run attached code to reproduce this.

      Internally acos is invoked on value that is slightly greater than 1 due to calculation errors: "c = 1.0000000000000002".

            psafrata Pavel Ĺ afrata
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: