Skip to content

Commit 712742e

Browse files
stemanndevmotion
andcommitted
Limited exp, cos, and sin to only be defined for dimensionless furlongs
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
1 parent 361000d commit 712742e

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
@@ -135,9 +135,9 @@ end
135135
end
136136

137137
@testset "non-standard numbers" begin
138-
Base.exp(f::Furlongs.Furlong) = exp(f.val)
139-
Base.cos(f::Furlongs.Furlong) = cos(f.val)
140-
Base.sin(f::Furlongs.Furlong) = sin(f.val)
138+
Base.exp(f::Furlongs.Furlong{0}) = exp(f.val)
139+
Base.cos(f::Furlongs.Furlong{0}) = cos(f.val)
140+
Base.sin(f::Furlongs.Furlong{0}) = sin(f.val)
141141

142142
furlong = Furlongs.Furlong{2}(1.0)
143143

0 commit comments

Comments
 (0)