Skip to content

Commit

Permalink
apply formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Jul 29, 2024
1 parent 031bbb7 commit bd34134
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/preprocessing/geometries/polygon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct Polygon{NDIMS, ELTYPE}
edge_normal = SVector{NDIMS}(normalize([-edge[2], edge[1]]))

push!(edge_vertices, (v1, v2))
push!(edge_vertices_ids, (i, i+1))
push!(edge_vertices_ids, (i, i + 1))
push!(edge_normals, edge_normal)
end

Expand Down
7 changes: 3 additions & 4 deletions src/preprocessing/point_in_poly/winding_number_jacobson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ end

@inline function naive_winding(polygon::Polygon{2}, edges, query_point)
winding_number = sum(edges, init=zero(eltype(polygon))) do edge
a = edge_vertex(polygon, edge, 1) - query_point
a = edge_vertex(polygon, edge, 1) - query_point
b = edge_vertex(polygon, edge, 2) - query_point

return atan(det([a b]), (dot(a, b)))
Expand Down Expand Up @@ -75,7 +75,8 @@ struct WindingNumberJacobson{ELTYPE, W}
end
end

function (point_in_poly::WindingNumberJacobson)(geometry, points; store_winding_number=false)
function (point_in_poly::WindingNumberJacobson)(geometry, points;
store_winding_number=false)
(; winding_number_factor, winding) = point_in_poly

inpoly = falses(size(points, 2))
Expand Down Expand Up @@ -113,7 +114,6 @@ end
# `edge` holds the coordinates of each vertex
@inline edge_vertex(mesh, edge, index) = edge[index]


# This method is used, when `naive_winding` is called with `(winding::HierarchicalWinding)`
# and the query point is outside the bounding box. That is, we use the closure of the box.
# `face` holds the index of each vertex.
Expand All @@ -130,7 +130,6 @@ end
return mesh.vertices[v_id]
end


# This method is used, when `naive_winding` is called with `(winding::HierarchicalWinding)`
# and the bounding box is a leaf.
# `face` is the index of the face.
Expand Down

0 comments on commit bd34134

Please sign in to comment.