equals(Object ) on Tuple3d not defined

Bug #337323 reported by twak on 2009-03-03
Affects Status Importance Assigned to Milestone
vecmath1.2 (Ubuntu)

Bug Description

The vecmath Tuple3d class doesn't define equals correctly.

the method missing (from the GPL2'd java3d vecmath) is

    public boolean equals(Object t1)
      try {
           Tuple3d t2 = (Tuple3d) t1;
           return(this.x == t2.x && this.y == t2.y && this.z == t2.z);
      catch (ClassCastException e1) {return false;}
      catch (NullPointerException e2) {return false;}


boolean equals (Tuple3d) isn't enough!

public class NewClass
    public static void main (String[] args)
        Vector3d v = new Vector3d(1,2,3);
        Point3d p = new Point3d(1,2,3);

                v.equals( (Object)p));
                v.equals( (Object)new Point3d(1,2,3))== v.equals( p ));

Should consider replacing this package with the official vecmath package now it's been GPL'd?

Onkar Shinde (onkarshinde) wrote :

The official vecmath package is now available in karmic. And unofficial vecmath1.2 is likely to be removed from repositories.

Changed in vecmath1.2 (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers