Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Nov 12, 2024
1 parent e4ddf78 commit 91ed795
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec = (
g = (
bezier = BezierCurve([Point(t, sin(t), 0) for t in range(-pi, pi, length = 361)]),
triangle = Triangle(Point(1, 0, 0), Point(0, 1, 0), Point(0, 0, 1)),
tetrahedron = let
tetrahedron = let
a = Point(0, 3, 0)
b = Point(-7, 0, 0)
c = Point(8, 0, 0)
Expand Down
3 changes: 2 additions & 1 deletion src/specializations/Tetrahedron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ end

function _parametric(tetrahedron::Meshes.Tetrahedron, t1, t2, t3)
if t3 < 0 || t3 > 1
throw(DomainError(t3, "tetrahedron(t1, t2, t3) is not defined for t3 outside [0, 1]."))
msg = "tetrahedron(t1, t2, t3) is not defined for t3 outside [0, 1]."
throw(DomainError(t3, msg))
end

# Take a triangular cross-section at t3
Expand Down
3 changes: 2 additions & 1 deletion src/specializations/Triangle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ end

function _parametric(triangle::Meshes.Triangle, t1, t2)
if (t1 < 0 || t1 > 1) || (t2 < 0 || t2 > 1)
throw(DomainError(t3, "triangle(t1, t2) is not defined for (t1, t2) outside [0, 1]^2."))
msg ="triangle(t1, t2) is not defined for (t1, t2) outside [0, 1]^2."
throw(DomainError((t1, t2), msg))
end

# Form a line segment between sides
Expand Down

0 comments on commit 91ed795

Please sign in to comment.