Skip to content

Instantly share code, notes, and snippets.

@OTDE
Last active November 25, 2019 23:21
Show Gist options
  • Select an option

  • Save OTDE/1a12b5fde9e63b7fd892a0cd37f16d68 to your computer and use it in GitHub Desktop.

Select an option

Save OTDE/1a12b5fde9e63b7fd892a0cd37f16d68 to your computer and use it in GitHub Desktop.
type definitions
abstract type ComponentType end
abstract type VecLike <:ComponentType end
struct Vec <:VecLike end
struct Pnt <:ComponentType end
struct Nrm <:VecLike end
abstract type CartesianTuple{N, T<:Number, U<:ComponentType} <:FieldVector{N, T} end
VectorLike{N, T<:Number} = CartesianTuple{N,T,U} where U<:VecLike
CVector{N, T<:Number} = CartesianTuple{N, T, Vec}
Point{N, T<:Number} = CartesianTuple{N, T, Pnt}
Normal{N, T<:Number} = CartesianTuple{N, T, Nrm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment