Skip to content
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

add a docstring for Rect and its aliases #208

Merged
merged 8 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/primitives/rectangles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ end
##
# Constructors & typealiases

"""
const Rect{N,T} = HyperRectangle{N,T}

A rectangle in N dimensions, formally the cartesian product of intervals. See also [`HyperRectangle`](@ref). Its aliases are

| |`T`(eltype)|`Float32` |`Int` |
|--------|-----------|----------|----------|
|`N`(dim)|`Rect{N,T}`|`Rectf{N}`|`Recti{N}`|
|`2` |`Rect2{T}` |`Rect2f` |`Rect2i` |
|`3` |`Rect3{T}` |`Rect3f` |`Rect3i` |

There is an additional unexported alias `RectT` that simply reverses the order of type parameters: `RectT{T,N} == Rect{N,T}`.

"""
putianyi889 marked this conversation as resolved.
Show resolved Hide resolved
Rect, Rect2, Rect3, RectT, Rectf, Rect2f, Rect3f, Recti, Rect2i, Rect3i

const Rect{N,T} = HyperRectangle{N,T}
const Rect2{T} = Rect{2,T}
const Rect3{T} = Rect{3,T}
Expand Down
Loading