From 98abd6f193e8b90780d1727a4e8e3ae2ffd3ce9d Mon Sep 17 00:00:00 2001 From: neviyn Date: Sun, 8 Nov 2020 22:23:01 +0000 Subject: [PATCH] Tightened imports --- src/transformations.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transformations.nim b/src/transformations.nim index 2730894..a5fc613 100644 --- a/src/transformations.nim +++ b/src/transformations.nim @@ -1,6 +1,6 @@ from "./matrix" import Matrix, matrix, `*` from "./tuple" import Tuple4 -import math +from math import sin, cos proc translation(x, y, z: float): Matrix = matrix(@[1.0, 0.0, 0.0, x, 0.0, 1.0, 0.0, y, 0.0, 0.0, 1.0, z, 0.0, 0.0, 0.0, 1.0], 4, 4) @@ -42,6 +42,7 @@ when isMainModule: import unittest from "./tuple" import point, vector, `==` from "./matrix" import inverse + from math import sqrt, PI suite "transformations": test "Multiplying by a translation matrix": let transform = translation(5.0, -3.0, 2.0)