Search in sources :

Example 6 with Slant

use of com.xenoage.zong.musiclayout.spacer.beam.Slant in project Zong by Xenoage.

the class SingleStaffBeamSlanterTest method computeCloseTest.

@Test
public void computeCloseTest() {
    Examples.test(Example.all, "close", 9, (suite, example) -> {
        float expectedSlant = example.getSlantIs();
        Slant slant = testee.computeClose(example.getStems(), example.getStemDir());
        assertSlantContains(expectedSlant, slant, example.name);
    });
}
Also used : ChlapikBeamSlant(material.beam.slant.ChlapikBeamSlant) RossBeamSlant(material.beam.slant.RossBeamSlant) Slant(com.xenoage.zong.musiclayout.spacer.beam.Slant) Test(org.junit.Test)

Example 7 with Slant

use of com.xenoage.zong.musiclayout.spacer.beam.Slant in project Zong by Xenoage.

the class SlantTest method slantDirTest.

@Test
public void slantDirTest() {
    Slant slant = slantIs(1, 2, Ascending);
    assertEquals(1, slant.getMinIs(), df);
    assertEquals(2, slant.getMaxIs(), df);
    assertEquals(1, slant.getFlattestIs(), df);
    slant = slantIs(1, 2, Descending);
    assertEquals(-2, slant.getMinIs(), df);
    assertEquals(-1, slant.getMaxIs(), df);
    assertEquals(-1, slant.getFlattestIs(), df);
}
Also used : Slant(com.xenoage.zong.musiclayout.spacer.beam.Slant) Test(org.junit.Test)

Aggregations

Slant (com.xenoage.zong.musiclayout.spacer.beam.Slant)7 Test (org.junit.Test)6 RossBeamSlant (material.beam.slant.RossBeamSlant)4 ChlapikBeamSlant (material.beam.slant.ChlapikBeamSlant)3 Example (material.beam.slant.Example)2 Placement (com.xenoage.zong.musiclayout.spacer.beam.placement.SingleStaffBeamPlacer.Placement)1 BeamedStems (com.xenoage.zong.musiclayout.spacer.beam.stem.BeamedStems)1 lombok.val (lombok.val)1 ExampleResult (material.ExampleResult)1 TouchExample (material.beam.stafftouch.TouchExample)1