JuliaGeometry / Quaternions.jl

A Julia implementation of quaternions
https://juliageometry.github.io/Quaternions.jl
MIT License
116 stars 37 forks source link

Remove `Base` function imports #105

Closed hyrodium closed 1 year ago

hyrodium commented 1 year ago

In julia, there are two ways to add methods to functions in another package.

# Extend function f without specifying package A in the definition
import A.f
f(::MyType) = ...

# Extend function g by specifying package B in the definition
using B
B.g(::MyType) = ...

I think the second way is preferred because the first way is not clear whether the function f is used or not. In fact, this package has import Base: convert and using LinearAlgebra: cross, dot, but these functions are not used in other context.

codecov[bot] commented 1 year ago

Codecov Report

Merging #105 (5efb8e5) into master (d15ad86) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #105   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          197       197           
=========================================
  Hits           197       197           
Impacted Files Coverage Δ
src/Quaternion.jl 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more