depth buffer implementation

This commit is contained in:
2024-08-07 16:36:23 +10:00
parent 3b33842260
commit fbff9b77fd
4 changed files with 125 additions and 33 deletions

View File

@ -1,4 +1,7 @@
public extension FloatingPoint {
@inline(__always) var degrees: Self { self * (180 / Self.pi) }
@inline(__always) var radians: Self { self * (Self.pi / 180) }
@inline(__always) func lerp(_ a: Self, _ b: Self) -> Self { b * self + a * (1 - self) }
@inline(__always) func mlerp(_ a: Self, _ b: Self) -> Self { a + (b - a) * self }
}