JuliaPhysics / JuliaPhysics/Unitful.jl
`StepRange` with float-based quantities should error
Open
ranges
v2.0
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
When dealing with floating-point numbers, `StepRangeLen` should be used instead of `StepRange`. However, this is currently allowed:
```julia
julia> StepRange(1.0u"m", 1.0u"m", 3.0u"m")
(1.0:1.0:3.0) m
```
I would argue that it should error, like it does for unitless numbers:
```julia
julia> StepRange(1.0, 1.0, 3.0)
ERROR: ArgumentError: StepRange should not be used with floating point
[...]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.