-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition shorthand #46
Conversation
Codecov Report
@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 90.88% 90.60% -0.28%
==========================================
Files 4 4
Lines 329 330 +1
==========================================
Hits 299 299
- Misses 30 31 +1
Continue to review full report at Codecov.
|
Translation(p::Union{Point, Symbol}) = Translation(O, p) | ||
|
||
""" | ||
Translation(x::Real, y::Real) | ||
|
||
Create a `Translation(O, Point(x,y))` such that a translation is done from the origin. | ||
Shorthand for writing `Translation(Point(x,y))`. | ||
""" | ||
Translation(x::Real, y::Real) = Translation(Point(x, y)) | ||
|
||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we decided to only thoroughly document exported functions, could you add a line of an example invocation of this function? To show how it can be used ?
Rotation as a transition from 0.0 to `r` . | ||
Can be used as a short-hand. | ||
""" | ||
Rotation(r::Union{Float64, Symbol}) = Rotation(r, r) | ||
Rotation(r::Union{Float64, Symbol}) = Rotation(0.0, r) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we decided to only thoroughly document exported functions, could you add a line of an example invocation of this function? To show how it can be used ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only a few docstring fixes. Also, can you fix up the docstrings in such a way that they are compatible with Documenter.jl
if they are not already prepared?
With regards to unit.jl
should we have additional checks there for #18 Or are the animation tests satisfactory?
Thanks for the review. Can you clarify on what you mean by your point about Documenter? They should all be normal docstrings like others. I followed docstring practice as for the currently existing docstrings for Transformation and Rotation. I can have a link to I can't think of a unit test for #18 so I think the current tests are ok (mentioned improvements in #38 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving this now based on our conversation about making the discussion about docstrings into a tutorial.
Add tutorial about rotations and translations (ping #25 )
As discussed in #33 we decided to revert
Translation(p)
which mapped toTranslation(p, p)
and now map it toTranslation(O, p)
Additionally one can now write
Translation(x, y)
such that one does not need to writePoint
every time.