mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-04 03:09:45 +00:00
Merge pull request #462 from revarbat/revarbat_dev
Fix rot(from=,to=,a=)...
This commit is contained in:
commit
26eb60f2e4
2 changed files with 3 additions and 3 deletions
|
@ -304,7 +304,7 @@ module test_rot() {
|
|||
for (a = angs) {
|
||||
assert_equal(
|
||||
rot(from=vec1, to=vec2, a=a),
|
||||
affine3d_rot_from_to(vec1,vec2) * affine3d_zrot(a),
|
||||
affine3d_rot_from_to(vec1,vec2) * affine3d_rot_by_axis(vec1,a),
|
||||
info=str(
|
||||
"from = ", vec1, ", ",
|
||||
"to = ", vec2, ", ",
|
||||
|
@ -314,7 +314,7 @@ module test_rot() {
|
|||
assert_equal(
|
||||
rot(from=vec1, to=vec2, a=a, p=pts3d),
|
||||
apply(
|
||||
affine3d_rot_from_to(vec1,vec2) * affine3d_zrot(a),
|
||||
affine3d_rot_from_to(vec1,vec2) * affine3d_rot_by_axis(vec1,a),
|
||||
pts3d
|
||||
),
|
||||
info=str(
|
||||
|
|
|
@ -425,7 +425,7 @@ function rot(a=0, v, cp, from, to, reverse=false, planar=false, p, _m) =
|
|||
cp = is_undef(cp)? undef : point3d(cp),
|
||||
m1 = !is_undef(from)? (
|
||||
assert(is_num(a))
|
||||
affine3d_rot_from_to(from,to) * affine3d_zrot(a)
|
||||
affine3d_rot_from_to(from,to) * affine3d_rot_by_axis(from,a)
|
||||
) :
|
||||
!is_undef(v)? assert(is_num(a)) affine3d_rot_by_axis(v,a) :
|
||||
is_num(a)? affine3d_zrot(a) :
|
||||
|
|
Loading…
Reference in a new issue