assertEquals(.5-2f/3, axis.size(1), DELTA);
assertEquals(1f/3, axis.size(2), DELTA);
}
@Test public void testAxisClamp () {
Axis axis = checkCoords(Scale9.clamp(new Axis(1), 1));
assertEquals(1f/3, axis.size(0), DELTA);
assertEquals(1-2f/3, axis.size(1), DELTA);
assertEquals(1f/3, axis.size(2), DELTA);
axis = checkCoords(Scale9.clamp(new Axis(2).resize(1, 1.5f), 1));
assertEquals(.25f, axis.size(0), DELTA);
assertEquals(.5f, axis.size(1), DELTA);
assertEquals(.25f, axis.size(2), DELTA);
axis = checkCoords(Scale9.clamp(new Axis(1), .5f));
assertEquals(.25f, axis.size(0), DELTA);
assertEquals(0, axis.size(1), DELTA);
assertEquals(.25f, axis.size(2), DELTA);
}