Add Math module and an extension to float4 to make a float3

This commit is contained in:
Eryn Wells 2018-11-20 11:00:59 -07:00
parent 43e42f5374
commit 55f7c6fe78
2 changed files with 20 additions and 0 deletions

16
Terrain2/Math.swift Normal file
View file

@ -0,0 +1,16 @@
//
// Math.swift
// Terrain2
//
// Created by Eryn Wells on 11/20/18.
// Copyright © 2018 Eryn Wells. All rights reserved.
//
import Foundation
import simd
extension float4 {
var xyz: float3 {
return float3(x, y, z)
}
}