Skip to content

Commit 3ef7c37

Browse files
stemanndevmotion
andauthored
Limited exp, cos, and sin to only be defined for dimensionless furlongs
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
1 parent b932157 commit 3ef7c37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/DerivativeTest.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ end
115115
end
116116

117117
@testset "non-standard numbers" begin
118-
Base.exp(f::Furlongs.Furlong) = exp(f.val)
119-
Base.cos(f::Furlongs.Furlong) = cos(f.val)
120-
Base.sin(f::Furlongs.Furlong) = sin(f.val)
118+
Base.exp(f::Furlongs.Furlong{0}) = exp(f.val)
119+
Base.cos(f::Furlongs.Furlong{0}) = cos(f.val)
120+
Base.sin(f::Furlongs.Furlong{0}) = sin(f.val)
121121

122122
furlong = Furlongs.Furlong{2}(1.0)
123123

0 commit comments

Comments
 (0)