@Override public String toString() { StringBuffer b = new StringBuffer(); b.append("[").append( get0() ).append(", "); b.append( get1() ).append(", "); b.append( get2() ).append("]"); return b.toString(); }
@Override public String toString() { StringBuffer b = new StringBuffer(); b.append("[").append( get0() ).append(", "); b.append( get1() ).append(", "); b.append( get2() ).append("]"); return b.toString(); }
@Override public int hashCode() { return (int) (Double.doubleToRawLongBits(get0()) * Double.doubleToRawLongBits(get1()) * Double.doubleToRawLongBits(get2())); } }
@Override public int hashCode() { return (int) (Double.doubleToRawLongBits(get0()) * Double.doubleToRawLongBits(get1()) * Double.doubleToRawLongBits(get2())); } }
/** * Cross product, set a = b x c. * @param a a * @param b b * @param c c */ public static void dCalcVectorCross3(DVector3View a, DVector3View b, DVector3View c) { a.set0( b.get1()*c.get2() - b.get2()*c.get1() ); a.set1( b.get2()*c.get0() - b.get0()*c.get2() ); a.set2( b.get0()*c.get1() - b.get1()*c.get0() ); }
/** * Cross product, set a = b x c. * @param a a * @param b b * @param c c */ public static void dCalcVectorCross3(DVector3View a, DVector3View b, DVector3View c) { a.set0( b.get1()*c.get2() - b.get2()*c.get1() ); a.set1( b.get2()*c.get0() - b.get0()*c.get2() ); a.set2( b.get0()*c.get1() - b.get1()*c.get0() ); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof DVector3I)) return false; DVector3I v = (DVector3I) obj; return get0()==v.get0() && get1()==v.get1() && get2()==v.get2(); }
static boolean _dSafeNormalize3 (DVector3View a) double aa0 = Math.abs(a.get0()); double aa1 = Math.abs(a.get1()); double aa2 = Math.abs(a.get2());
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof DVector3I)) return false; DVector3I v = (DVector3I) obj; return get0()==v.get0() && get1()==v.get1() && get2()==v.get2(); }
/** * Return the 'dot' product of two vectors. * r = a0*b0 + a1*b1 + a2*b2; * @param b b * @return (this) * b */ @Override public final double dot(DVector3View b) { return get0()*b.get0() + get1()*b.get1() + get2()*b.get2(); }
/** * Return the 'dot' product of two vectors. * r = a0*b0 + a1*b1 + a2*b2; * @param b b * @return (this) * b */ @Override public final double dot(DVector3View b) { return get0()*b.get0() + get1()*b.get1() + get2()*b.get2(); }
public final void scale(double s) { set0( get0() * s ); set1( get1() * s ); set2( get2() * s ); }
public final void scale(double s) { set0( get0() * s ); set1( get1() * s ); set2( get2() * s ); }
static boolean _dSafeNormalize3 (DVector3View a) double aa0 = Math.abs(a.get0()); double aa1 = Math.abs(a.get1()); double aa2 = Math.abs(a.get2());