Skip to content

Commit 46ea52a

Browse files
committed
automatic formatting
1 parent a84b168 commit 46ea52a

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

src/primitives/rectangles.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ end
589589

590590
function faces(::Rect3)
591591
return QuadFace{Int}[
592-
(1, 2, 4, 3), (7, 8, 6, 5), (5, 6, 2, 1),
592+
(1, 2, 4, 3), (7, 8, 6, 5), (5, 6, 2, 1),
593593
(3, 4, 8, 7), (1, 3, 7, 5), (6, 8, 4, 2)
594594
]
595595
end

test/geometrytypes.jl

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ using Test, GeometryBasics
2828
(7.535533905932738, 1.4644660940672627, 6.0),
2929
(6.041241452319315, 7.041241452319315, 1.9175170953613705),
3030
(0.46446609406726314, 8.535533905932738, 6.0),
31-
(1.9587585476806848, 2.9587585476806857, 10.08248290463863),
32-
(1, 2, 3),
31+
(1.9587585476806848, 2.9587585476806857, 10.08248290463863),
32+
(1, 2, 3),
3333
(4, 5, 6)
3434
]
3535

3636
@test decompose(Point3{Float64}, Tessellation(s, 8)) positions
3737

3838
_faces = TriangleFace[
39-
(9, 2, 1), (9, 3, 2), (9, 4, 3), (9, 1, 4), (1, 2, 6), (1, 6, 5),
40-
(2, 3, 7), (2, 7, 6), (3, 4, 8), (3, 8, 7), (4, 1, 5), (4, 5, 8),
39+
(9, 2, 1), (9, 3, 2), (9, 4, 3), (9, 1, 4), (1, 2, 6), (1, 6, 5),
40+
(2, 3, 7), (2, 7, 6), (3, 4, 8), (3, 8, 7), (4, 1, 5), (4, 5, 8),
4141
(10, 5, 6), (10, 6, 7), (10, 7, 8), (10, 8, 5)]
4242

4343
@test _faces == decompose(TriangleFace{Int}, Tessellation(s, 8))
@@ -46,7 +46,7 @@ using Test, GeometryBasics
4646
@test m === triangle_mesh(m)
4747
@test GeometryBasics.faces(m) == decompose(GLTriangleFace, _faces)
4848
@test GeometryBasics.coordinates(m) positions
49-
49+
5050
m = normal_mesh(s) # just test that it works without explicit resolution parameter
5151
@test hasproperty(m, :position)
5252
@test hasproperty(m, :normal)
@@ -56,15 +56,15 @@ using Test, GeometryBasics
5656

5757
ns = GeometryBasics.FaceView(
5858
Vec{3, Float32}[
59-
[0.70710677, -0.70710677, 0.0], [0.4082483, 0.4082483, -0.8164966],
60-
[-0.70710677, 0.70710677, -9.9991995f-17], [-0.4082483, -0.4082483, 0.8164966],
59+
[0.70710677, -0.70710677, 0.0], [0.4082483, 0.4082483, -0.8164966],
60+
[-0.70710677, 0.70710677, -9.9991995f-17], [-0.4082483, -0.4082483, 0.8164966],
6161
[-0.57735026, -0.57735026, -0.57735026], [0.57735026, 0.57735026, 0.57735026]
6262
], [
63-
GLTriangleFace(5, 5, 5), GLTriangleFace(5, 5, 5),
64-
GLTriangleFace(5, 5, 5), GLTriangleFace(5, 5, 5),
65-
QuadFace{Int64}(1, 2, 2, 1), QuadFace{Int64}(2, 3, 3, 2),
66-
QuadFace{Int64}(3, 4, 4, 3), QuadFace{Int64}(4, 1, 1, 4),
67-
GLTriangleFace(6, 6, 6), GLTriangleFace(6, 6, 6),
63+
GLTriangleFace(5, 5, 5), GLTriangleFace(5, 5, 5),
64+
GLTriangleFace(5, 5, 5), GLTriangleFace(5, 5, 5),
65+
QuadFace{Int64}(1, 2, 2, 1), QuadFace{Int64}(2, 3, 3, 2),
66+
QuadFace{Int64}(3, 4, 4, 3), QuadFace{Int64}(4, 1, 1, 4),
67+
GLTriangleFace(6, 6, 6), GLTriangleFace(6, 6, 6),
6868
GLTriangleFace(6, 6, 6), GLTriangleFace(6, 6, 6)
6969
]
7070
)
@@ -84,21 +84,20 @@ end
8484
@test decompose(Point2f, mesh) == pt_expa
8585

8686
b = Rect(Vec(1, 1, 1), Vec(1, 1, 1))
87-
pt_expb = Point{3,Int64}[[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2],
88-
[2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]]
87+
pt_expb = Point{3,Int64}[[1, 1, 1], [1, 1, 2], [1, 2, 1], [1, 2, 2],
88+
[2, 1, 1], [2, 1, 2], [2, 2, 1], [2, 2, 2]]
8989
@test decompose(Point{3,Int}, b) == pt_expb
90-
9190

9291
mesh = normal_mesh(b)
9392
@test faces(mesh) == GLTriangleFace[
94-
(1, 2, 4), (1, 4, 3), (7, 8, 6), (7, 6, 5), (5, 6, 2), (5, 2, 1),
93+
(1, 2, 4), (1, 4, 3), (7, 8, 6), (7, 6, 5), (5, 6, 2), (5, 2, 1),
9594
(3, 4, 8), (3, 8, 7), (1, 3, 7), (1, 7, 5), (6, 8, 4), (6, 4, 2)]
9695
@test normals(mesh) == GeometryBasics.FaceView(
97-
Vec{3, Float32}[[-1.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [0.0, 0.0, 1.0]],
96+
Vec{3, Float32}[[-1.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [0.0, 0.0, 1.0]],
9897
GLTriangleFace[(1, 1, 1), (1, 1, 1), (2, 2, 2), (2, 2, 2), (3, 3, 3), (3, 3, 3), (4, 4, 4), (4, 4, 4), (5, 5, 5), (5, 5, 5), (6, 6, 6), (6, 6, 6)]
9998
)
10099
@test coordinates(mesh) == Point{3, Float32}[
101-
[1.0, 1.0, 1.0], [1.0, 1.0, 2.0], [1.0, 2.0, 1.0], [1.0, 2.0, 2.0],
100+
[1.0, 1.0, 1.0], [1.0, 1.0, 2.0], [1.0, 2.0, 1.0], [1.0, 2.0, 2.0],
102101
[2.0, 1.0, 1.0], [2.0, 1.0, 2.0], [2.0, 2.0, 1.0], [2.0, 2.0, 2.0]]
103102

104103
@test isempty(Rect{3,Float32}())
@@ -248,7 +247,7 @@ end
248247
h1 = Rect(0.0, 0.0, 1.0, 1.0)
249248
h2 = Rect(1.0, 1.0, 2.0, 2.0)
250249
@test union(h1, h2) isa GeometryBasics.HyperRectangle{2,Float64}
251-
# @test GeometryBasics.diff(h1, h2) == h1
250+
# @test GeometryBasics.diff(h1, h2) == h1
252251
@test GeometryBasics.intersect(h1, h2) isa GeometryBasics.HyperRectangle{2,Float64}
253252

254253
b = Rect(0.0, 0.0, 1.0, 1.0)

0 commit comments

Comments
 (0)