From b711575b682f5e6fb28b7b70badfa22c5308606f Mon Sep 17 00:00:00 2001 From: treeform Date: Sat, 29 May 2021 16:33:03 -0700 Subject: [PATCH] Update readme. --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cad1e39..cea0730 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ float64 | double | DVec2 | DVec3 | DVec4 | DMat3 | DMat4 | DQuat | ## 2D & 3D Matrix math -You can combine and create matrices 2d and 3d matrices by passing 2d or 3d vectors to matrix functions: +You can combine and create 2d and 3d matrices by passing 2d or 3d vectors to matrix functions: ```nim let mat2d = translate(vec2(10, 20)) * rotate(45.toRadians) * scale(vec2(2)) @@ -42,16 +42,12 @@ let mat3d = translate(vec3(10, 20, 0)) * rotateZ(45.toRadians) * scale(vec3(2)) ## Almost equal operator -You can check if float point numbers are close, very useful for tests: +You can check if float point numbers or vectors are close, very useful for tests: ```nim 1.0 ~= 1.0 -0.0 ~= 0.0 --1.0 ~= -1.0 -not(0.1 ~= 0.2) -not(0.01 ~= 0.02) -not(0.001 ~= 0.002) -not(0.0001 ~= 0.0002) -not(0.00001 ~= 0.00002) +vec2(1.0, 2.0) ~= vec2(1.0, 2.0) +dvec2(1) ~= dvec2(1) +quat(1.0, 2.0, 3.0, 4.0) ~= quat(1.0, 2.0, 3.0, 4.0) ``` ## Number functions