Skip to content

Commit b9b9d8f

Browse files
authored
Document export of package functions in LorentzVectorBase (#33)
* Document export of package functions in LorentzVectorBase Added notes on exporting package functions and provided an example module. * Clarify export status of package functions * spelling from @Copilot
1 parent 0419c87 commit b9b9d8f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/src/10-interface.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ This allows users to choose more descriptive or domain-specific terminology with
120120
| `azimuthal_angle` | `phi` |
121121
| `pseudorapidity` | `eta` |
122122

123+
124+
Note, that most of the package functions are not exported. They can always be called with `LorentzVectorBase.` prefix.
125+
For convenience, these methods can be exported in custom packages that utilize LorentzVectorBase.
126+
For example, as follows,
127+
128+
```julia
129+
module Custom4Vector
130+
131+
import LorentzVectorBase: invariant_mass
132+
export invariant_mass
133+
134+
end
135+
```
136+
137+
See also [an example](https://github.com/mmikhasenko/FourVectors.jl/blob/main/src/FourVectors.jl#L28-L33) of exporting multiple selected methods in a loop.
138+
123139
## Coordinate System Tags
124140

125141
The following coordinate systems are supported via tags like `XYZT()`, `PtEtaPhiM()`, etc.:

0 commit comments

Comments
 (0)