Formatting changes
This commit is contained in:
parent
733838778a
commit
464401781e
@ -22,9 +22,7 @@ proc normalize*(tup: Tuple4): Tuple4 =
|
||||
let mag = tup.magnitude()
|
||||
Tuple4(x: tup.x / mag, y: tup.y / mag, z: tup.z / mag, w: tup.w / mag)
|
||||
proc dot*(lhs: Tuple4, rhs: Tuple4): float = lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z + lhs.w * rhs.w
|
||||
proc cross*(lhs: Tuple4, rhs: Tuple4): Tuple4 = vector(lhs.y * rhs.z - lhs.z * rhs. y,
|
||||
lhs.z * rhs.x - lhs.x * rhs.z,
|
||||
lhs.x * rhs.y - lhs.y * rhs.x)
|
||||
proc cross*(lhs: Tuple4, rhs: Tuple4): Tuple4 = vector(lhs.y * rhs.z - lhs.z * rhs.y, lhs.z * rhs.x - lhs.x * rhs.z, lhs.x * rhs.y - lhs.y * rhs.x)
|
||||
|
||||
when isMainModule:
|
||||
import unittest
|
||||
|
Loading…
Reference in New Issue
Block a user