Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Removing functions zero3 and one3. #159

Merged
merged 2 commits into from
Apr 30, 2021
Merged

Removing functions zero3 and one3. #159

merged 2 commits into from
Apr 30, 2021

Conversation

BrianGun
Copy link
Contributor

@BrianGun BrianGun commented Apr 29, 2021

Description

Removed zero3,one3,zero4,one4. Julia already provides the zero and ones functions that have equivalent functionality.

Simplified some of the Transform functions.

Fixes # (157)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

wrote tests to verify that the new Transform functions generated the correct matrices and added these tests to our unit test set.

Test Configuration(s):

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Fixes #157

added a few tests for Transform. Simplified the transform code somewhat.
@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2021

Codecov Report

Merging #159 (3a9910d) into main (e14c997) will decrease coverage by 0.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   50.71%   49.86%   -0.85%     
==========================================
  Files          66       64       -2     
  Lines        6470     6421      -49     
==========================================
- Hits         3281     3202      -79     
- Misses       3189     3219      +30     
Impacted Files Coverage Δ
src/Geometry/Transform.jl 40.28% <100.00%> (+2.25%) ⬆️
src/Optical/Emitters/Emitters.jl 0.00% <0.00%> (-20.00%) ⬇️
src/Geometry/Primitives/Qtype.jl 75.00% <0.00%> (-8.34%) ⬇️
src/Optical/LensAssembly.jl 48.22% <0.00%> (-7.33%) ⬇️
src/Optical/OpticalInterface.jl 63.23% <0.00%> (-4.30%) ⬇️
src/Geometry/CSG/Intersection.jl 48.57% <0.00%> (-2.14%) ⬇️
src/Geometry/Geometry.jl 0.00% <0.00%> (-1.86%) ⬇️
src/Geometry/Primitives/Curves/BSpline.jl 66.15% <0.00%> (-0.52%) ⬇️
src/Geometry/CSG/Interval.jl 83.20% <0.00%> (-0.37%) ⬇️
src/Geometry/CSG/CSG.jl 84.88% <0.00%> (-0.06%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e14c997...3a9910d. Read the comment docs.

@@ -163,6 +147,7 @@ Transform(rotation::AbstractArray{S,2}, translation::AbstractArray{S,1})
Transform{T} = SMatrix{4,4,T,16}
export Transform

lastrow(::Type{T}) where{T<:Real} = SMatrix{1,4,T}(zero(T),zero(T),zero(T),one(T))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about lastrow(::Type{T} = Float64) to conform with the rest of the code in Transform.jl?

i'll probably revisit these convenience functions later as i think they could be a little more systematic, but this is fine for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lastrow was only being used in one place so I removed the function and inlined it.

Fixes #157

removed lastrow function and inlined it since it was only used in one place.
@BrianGun BrianGun merged commit c2e3101 into main Apr 30, 2021
@BrianGun BrianGun deleted the BrianGun/issue157 branch April 30, 2021 02:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants