class DoubleBond3DParity extends GeometricParity {

    @Override
    public int parity() {

        // create three vectors, v->u, v->w and u->x
        double[] vu = toVector(v, u);
        double[] vw = toVector(v, w);
        double[] ux = toVector(u, x);

        // normal vector (to compare against), the normal vector (n) looks like:
        // x     n w
        //  \    |/
        //   u = v
        double[] normal = crossProduct(vu, crossProduct(vu, vw));

        // compare the dot products of v->w and u->x, if the signs are the same
        // they are both pointing the same direction. if a value is close to 0
        // then it is at pi/2 radians (i.e. unspecified) however 3D coordinates
        // are generally discrete and do not normally represent on unspecified
        // stereo configurations so we don't check this
        int parity = (int) Math.signum(dot(normal, vw)) * (int) Math.signum(dot(normal, ux));

        // invert sign, this then matches with Sp2 double bond parity
        return parity * -1;
    }

    public  DoubleBond3DParity(Point3d left, Point3d right, Point3d leftSubstituent, Point3d rightSubstituent);

}