Ejemplo n.º 1
0
    [Fact] public void MinMax()
    {
        Data_Generator dg = new Data_Generator();

        (Vector min, Vector max, Vector v)dat;
        dat.v   = dg.newVector();
        dat.min = new Vector(float.MinValue, float.MinValue, float.MinValue);
        dat.max = dg.newZeroVector();

        (Vector min, Vector max)exp;
        exp.min = dat.min;
        exp.max = dat.v;

        var v   = new VectorHelper();
        var act = v.minMax(dat.min, dat.max, dat.v);

        test.vectorEqual(exp.min, act.min);
        test.vectorEqual(exp.max, act.max);
    }
Ejemplo n.º 2
0
    [Fact] public void MinMax()
    {
        Data_Generator dg = new Data_Generator();
        Hand_Generator hg = new Hand_Generator(dg);

        (Joints min, Joints max, Joints j)dat;
        dat.j   = hg.newJoints();
        dat.min = new Joints(dg.newMinVectors(5), dg.newMinVectors(5), dg.newMinVectors(5), dg.newMinVectors(5),
                             dg.newMinVectors(5), dg.newMinVector(), dg.newFloat(100));
        dat.max = new Joints(dg.newZeroVectors(5), dg.newZeroVectors(5), dg.newZeroVectors(5), dg.newZeroVectors(5),
                             dg.newZeroVectors(5), dg.newZeroVector(), dg.newFloat(100));

        (Joints min, Joints max)exp;
        exp.min = dat.min;
        exp.max = dat.j;

        var vH = new VectorHelper();
        var jH = new JointsHelper(vH);

        var act = jH.minMax(dat.min, dat.max, dat.j);

        test.jointsEqual(exp.min, act.min);
        test.jointsEqual(exp.max, act.max);
    }