Skip to content

Commit cab2f07

Browse files
tpappc42f
authored andcommitted
minor typo fixes and typesetting changes (#667)
* minor typo fixes and typesetting changes - fix typos - use em-dashes - reword a confusing sentence - replace `eig` with `eigen`
1 parent 3bbbd07 commit cab2f07

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/src/pages/api.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ Convenience macros `@MVector`, `@MMatrix` and `@MArray` are provided.
149149
### `SizedArray`: a decorate size wrapper for `Array`
150150

151151
Another convenient mutable type is the `SizedArray`, which is just a wrapper-type
152-
about a standard Julia `Array` which declares its knwon size. For example, if
152+
about a standard Julia `Array` which declares its known size. For example, if
153153
we knew that `a` was a 2×2 `Matrix`, then we can type `sa = SizedArray{Tuple{2,2}}(a)`
154154
to construct a new object which knows the type (the size will be verified
155155
automatically). A more convenient syntax for obtaining a `SizedArray` is by calling
156156
a `Size` object, e.g. `sa = Size(2,2)(a)`.
157157

158158
Then, methods on `sa` will use the specialized code provided by the *StaticArrays*
159-
pacakge, which in many cases will be much, much faster. For example, calling
160-
`eig(sa)` will be signficantly faster than `eig(a)` since it will perform a
159+
package, which in many cases will be much, much faster. For example, calling
160+
`eigen(sa)` will be signficantly faster than `eigen(a)` since it will perform a
161161
specialized 2×2 matrix diagonalization rather than a general algorithm provided
162162
by Julia and *LAPACK*.
163163

@@ -166,9 +166,9 @@ an `MArray` might be preferable.
166166

167167
### `FieldVector`
168168

169-
Sometimes it might be useful to imbue your own types, having multiple fields,
170-
with vector-like properties. *StaticArrays* can take care of this for you by
171-
allowing you to inherit from `FieldVector{N, T}`. For example, consider:
169+
Sometimes it is useful to give your own struct types the properties of a vector.
170+
*StaticArrays* can take care of this for you by allowing you to inherit from
171+
`FieldVector{N, T}`. For example, consider:
172172

173173
```julia
174174
struct Point3D <: FieldVector{3, Float64}
@@ -194,7 +194,7 @@ appropriate method for `similar`,
194194
### Implementing your own types
195195

196196
You can easily create your own `StaticArray` type, by defining linear
197-
`getindex` (and optionally `setindex!` for mutable types - see
197+
`getindex` (and optionally `setindex!` for mutable types --- see
198198
`setindex(::MArray, val, i)` in *MArray.jl* for an example of how to
199199
achieve this through pointer manipulation). Your type should define a constructor
200200
that takes a tuple of the data (and mutable containers may want to define a
@@ -234,7 +234,7 @@ instance, e.g. `Size(2)(v)`.
234234
### Arrays of static arrays
235235

236236
Storing a large number of static arrays is convenient as an array of static
237-
arrays. For example, a collection of positions (3D coordinates - `SVector{3,Float64}`)
237+
arrays. For example, a collection of positions (3D coordinates --- `SVector{3,Float64}`)
238238
could be represented as a `Vector{SVector{3,Float64}}`.
239239

240240
Another common way of storing the same data is as a 3×`N` `Matrix{Float64}`.

0 commit comments

Comments
 (0)