Removed affine3d_chain() calls.

This commit is contained in:
Garth Minette 2021-01-20 18:14:04 -08:00
parent 9a395023ff
commit ef4d367a98
2 changed files with 5 additions and 19 deletions

View file

@ -259,21 +259,13 @@ module test_rot() {
for (xa=angs, ya=angs, za=angs) { for (xa=angs, ya=angs, za=angs) {
assert_equal( assert_equal(
rot([xa,ya,za]), rot([xa,ya,za]),
affine3d_chain([ affine3d_zrot(za) * affine3d_yrot(ya) * affine3d_xrot(xa),
affine3d_xrot(xa),
affine3d_yrot(ya),
affine3d_zrot(za)
]),
info=str("[X,Y,Z] = ",[xa,ya,za]) info=str("[X,Y,Z] = ",[xa,ya,za])
); );
assert_equal( assert_equal(
rot([xa,ya,za],p=pts3d), rot([xa,ya,za],p=pts3d),
apply( apply(
affine3d_chain([ affine3d_zrot(za) * affine3d_yrot(ya) * affine3d_xrot(xa),
affine3d_xrot(xa),
affine3d_yrot(ya),
affine3d_zrot(za)
]),
pts3d pts3d
), ),
info=str("[X,Y,Z] = ",[xa,ya,za], ", p=...") info=str("[X,Y,Z] = ",[xa,ya,za], ", p=...")
@ -312,10 +304,7 @@ module test_rot() {
for (a = angs) { for (a = angs) {
assert_equal( assert_equal(
rot(from=vec1, to=vec2, a=a), rot(from=vec1, to=vec2, a=a),
affine3d_chain([ affine3d_rot_from_to(vec1,vec2) * affine3d_zrot(a),
affine3d_zrot(a),
affine3d_rot_from_to(vec1,vec2)
]),
info=str( info=str(
"from = ", vec1, ", ", "from = ", vec1, ", ",
"to = ", vec2, ", ", "to = ", vec2, ", ",
@ -325,10 +314,7 @@ module test_rot() {
assert_equal( assert_equal(
rot(from=vec1, to=vec2, a=a, p=pts3d), rot(from=vec1, to=vec2, a=a, p=pts3d),
apply( apply(
affine3d_chain([ affine3d_rot_from_to(vec1,vec2) * affine3d_zrot(a),
affine3d_zrot(a),
affine3d_rot_from_to(vec1,vec2)
]),
pts3d pts3d
), ),
info=str( info=str(

View file

@ -6,7 +6,7 @@
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,535]; BOSL_VERSION = [2,0,536];
// Section: BOSL Library Version Functions // Section: BOSL Library Version Functions