Skip to content

Commit

Permalink
Tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
HexagonNico committed Oct 30, 2023
1 parent e4227c4 commit c4e7017
Show file tree
Hide file tree
Showing 23 changed files with 1,378 additions and 1,371 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*.scala]
indent_style = space
indent_size = 2

[*.java]
indent_style = space
indent_size = 4
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@

public class TestColor3f {

@Test
public void testSumValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$plus(0.5f, 0.6f, 0.7f), c.add(0.5f, 0.6f, 0.7f));
}

@Test
public void testSumColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$plus(c2), c1.add(c2));
}

@Test
public void testSubtractValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$minus(0.5f, 0.6f, 0.7f), c.subtract(0.5f, 0.6f, 0.7f));
}

@Test
public void testSubtractColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$minus(c2), c1.subtract(c2));
}

@Test
public void testMultiplyValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$times(0.5f, 0.6f, 0.7f), c.blend(0.5f, 0.6f, 0.7f));
}

@Test
public void testMultiplyColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$times(c2), c1.blend(c2));
}

@Test
public void testMultiplyScalar() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$times(1.5f), c.multiply(1.5f));
}
@Test
public void testSumValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$plus(0.5f, 0.6f, 0.7f), c.add(0.5f, 0.6f, 0.7f));
}

@Test
public void testSumColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$plus(c2), c1.add(c2));
}

@Test
public void testSubtractValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$minus(0.5f, 0.6f, 0.7f), c.subtract(0.5f, 0.6f, 0.7f));
}

@Test
public void testSubtractColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$minus(c2), c1.subtract(c2));
}

@Test
public void testMultiplyValues() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$times(0.5f, 0.6f, 0.7f), c.blend(0.5f, 0.6f, 0.7f));
}

@Test
public void testMultiplyColors() {
Color3f c1 = new Color3f(0.1f, 0.2f, 0.3f);
Color3f c2 = new Color3f(0.5f, 0.6f, 0.7f);
Assert.assertEquals(c1.$times(c2), c1.blend(c2));
}

@Test
public void testMultiplyScalar() {
Color3f c = new Color3f(0.1f, 0.2f, 0.3f);
Assert.assertEquals(c.$times(1.5f), c.multiply(1.5f));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@

public class TestColor4f {

@Test
public void testSumValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$plus(0.5f, 0.6f, 0.7f, 0.5f), c.add(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testSumColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$plus(c2), c1.add(c2));
}

@Test
public void testSubtractValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$minus(0.5f, 0.6f, 0.7f, 0.5f), c.subtract(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testSubtractColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$minus(c2), c1.subtract(c2));
}

@Test
public void testMultiplyValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$times(0.5f, 0.6f, 0.7f, 0.5f), c.blend(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testMultiplyColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$times(c2), c1.blend(c2));
}

@Test
public void testMultiplyScalar() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$times(1.5f), c.multiply(1.5f));
}
@Test
public void testSumValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$plus(0.5f, 0.6f, 0.7f, 0.5f), c.add(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testSumColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$plus(c2), c1.add(c2));
}

@Test
public void testSubtractValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$minus(0.5f, 0.6f, 0.7f, 0.5f), c.subtract(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testSubtractColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$minus(c2), c1.subtract(c2));
}

@Test
public void testMultiplyValues() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$times(0.5f, 0.6f, 0.7f, 0.5f), c.blend(0.5f, 0.6f, 0.7f, 0.5f));
}

@Test
public void testMultiplyColors() {
Color4f c1 = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Color4f c2 = new Color4f(0.5f, 0.6f, 0.7f, 0.5f);
Assert.assertEquals(c1.$times(c2), c1.blend(c2));
}

@Test
public void testMultiplyScalar() {
Color4f c = new Color4f(0.1f, 0.2f, 0.3f, 0.5f);
Assert.assertEquals(c.$times(1.5f), c.multiply(1.5f));
}
}
114 changes: 57 additions & 57 deletions src/test/java/io/github/hexagonnico/vecmatlib/matrix/TestMat2d.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,66 @@

public class TestMat2d {

@Test
public void testPlus() {
Mat2d a = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Mat2d b = new Mat2d(
4.0, 5.0,
3.0, 6.0
);
Assert.assertEquals(a.$plus(b), a.plus(b));
}
@Test
public void testPlus() {
Mat2d a = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Mat2d b = new Mat2d(
4.0, 5.0,
3.0, 6.0
);
Assert.assertEquals(a.$plus(b), a.plus(b));
}

@Test
public void testNegated() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.unary_$minus(), m.negated());
}
@Test
public void testNegated() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.unary_$minus(), m.negated());
}

@Test
public void testMultiplyByScalar() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.$times(1.5), m.multipliedBy(1.5));
}
@Test
public void testMultiplyByScalar() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.$times(1.5), m.multipliedBy(1.5));
}

@Test
public void testMultiplyVector() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Vec2d v = new Vec2d(1.5, 2.5);
Assert.assertEquals(m.$times(v), m.multiply(v));
}
@Test
public void testMultiplyVector() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Vec2d v = new Vec2d(1.5, 2.5);
Assert.assertEquals(m.$times(v), m.multiply(v));
}

@Test
public void testMultiplyVectorValues() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.$times(1.5, 2.5), m.multiply(1.5, 2.5));
}
@Test
public void testMultiplyVectorValues() {
Mat2d m = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Assert.assertEquals(m.$times(1.5, 2.5), m.multiply(1.5, 2.5));
}

@Test
public void testMultiplyMatrix() {
Mat2d a = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Mat2d b = new Mat2d(
4.0, 5.0,
3.0, 6.0
);
Assert.assertEquals(a.$times(b), a.multiply(b));
}
@Test
public void testMultiplyMatrix() {
Mat2d a = new Mat2d(
1.0, 2.0,
3.0, 4.0
);
Mat2d b = new Mat2d(
4.0, 5.0,
3.0, 6.0
);
Assert.assertEquals(a.$times(b), a.multiply(b));
}
}
Loading

0 comments on commit c4e7017

Please sign in to comment.