Skip to content

Commit 05c2cb7

Browse files
authored
Update README for Size
1 parent e6d7387 commit 05c2cb7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,10 @@ you may want to define a default constructor (no inputs) that can be called by
348348

349349
### Implementing your own types
350350

351-
You can easily create your own `StaticArray` type, by defining both `size` on
352-
the type, and linear `getindex` (and optionally `setindex!` for mutable types
353-
- see `setindex(::SVector, val, i)` in *MVector.jl* for an example of how to
351+
You can easily create your own `StaticArray` type, by defining both `Size` (on the
352+
*type*, e.g. `StaticArrays.Size(::Type{Point3D}) = Size(3)`), and linear
353+
`getindex` (and optionally `setindex!` for mutable types - see
354+
`setindex(::SVector, val, i)` in *MVector.jl* for an example of how to
354355
achieve this through pointer manipulation). Your type should define a constructor
355356
that takes a tuple of the data (and mutable containers may want to define a
356357
default constructor).

0 commit comments

Comments
 (0)