-
Adding
GeometriaAlgorithms
library that will feature useful computational geometry algorithm implementations. -
Adding
TransposableMatrixType
protocol to describe matrices that can be transposed into another known matrix type. -
Added
DivisibleRectangleType.subdivided()
. -
Fixing
NSphere.project(_:Vector)
being offset from correct point by-self.center
. -
TakeVector3
has been removed in favor ofVectorTakeable
protocol. -
Forcing
Vector3-
specializing protocols to require the same specialization on itsSubVector4
, e.g.Vector3FloatingPoint
now requiresSubVector4: Vector4FloatingPoint
. -
Added
Vector3Multiplicative.tripleProduct
method. -
Forcing
Vector2-
specializing protocols to require the same specialization on itsSubVector3
, e.g.Vector2FloatingPoint
now requiresSubVector3: Vector3FloatingPoint
. -
Added
Vector2Multiplicative.tripleProduct
method. -
Added
NSquare.vertices
whenNSquare.Vector
conforms toVectorAdditive
. -
Added
LineCategory
bit-flag forLineType
conformers that specifies the category of the line type (line, ray, or line segment). -
Added
PlaneIntersectablePlane2Type
to generalize line intersection of 1D planes (lines) in 2D spaces. -
Added
PlaneIntersectablePlane3Type
to generalize line intersection of 2D planes in 3D spaces.
-
Added
Hyperplane
protocol to represent hyperplanes, along with proper type aliases for 2-, 3-, and 4-dimensional hyperplanes. -
Added
VectorTakeable
protocol, and making all vector protocols conform to it. With it, it's possible to index into a vector type to produce different vector types based on combinations of dimensions of a vector:
let vector = Vector3D(x: 3.5, y: 2.1, z: 1.0)
print(vector[.x, .z]) // Prints "(x: 3.5, y: 1.0)"
print(vector[.x, .z, .y]) // Prints "(x: 3.5, y: 1.0, z: 2.1)"
print(vector[.z, .y, .x]) // Prints "(x: 1.0, y: 2.1, x: 3.5)"
print(vector[.z, .y, .x, .z]) // Prints "(x: 1.0, y: 2.1, x: 3.5, w: 1.0)"
-
Added
Vector<2/3/4>TakeDimensions
to accompany theVectorTakeable
protocol and serve as a default conformance toVector<2/3/4>Type
protocols. -
Added
AdditiveRectangle.vertices
getter, which is automatically synthesized for any conforming type.
Initial release