zero
Vector.swift:9static let zero: SIMD3<Float>
static let zero: SIMD3<Float>
where Scalar == Float
import Voxels
A Swift library for storage, manipulation, export, and 3D rendering of Voxel data.
import Swift
@frozen struct SIMD3<Scalar> where Scalar : SIMDScalar
A vector of three scalar values.
@frozen struct Float
A single-precision, floating-point value type.
static let epsilon: Float
Tolerance for determining minimum or nearly-equivalent lengths for vectors.
var isNormalized: Bool { get }
A Boolean value indicating that the length of the vector is 1
.
var length: Float { get }
The length of the vector.
var lengthSquared: Float { get }
The square of the length.
func abs() -> Vector
func cross(_ other: Vector) -> Vector
Computes the cross-product of this vector and another you provide.
func distance_squared(_ other: `Self`) -> Float
The squared distance from this vector to another you provide.
func dot(_ another: Vector) -> Float
Computes the dot-product of this vector and another you provide.
func lerp(_ a: Vector, _ t: Float) -> Vector
Linearly interpolate between this vector and another you provide.
func normalized() -> Vector
Returns a normalized vector with a length of one.
func yzx() -> SIMD3<Scalar>
Returns the vector, rewritten and reflected from x, y, z to y, z, x
func zxy() -> SIMD3<Scalar>
Returns the vector, rewritten and reflected from x, y, z to z, x, y