mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-04-23 07:33:05 +02:00
changed function signature
This commit is contained in:
parent
857eef52e1
commit
7ec7ef91c7
@ -27,25 +27,23 @@ module assertEqualPoint(expected, actual) {
|
||||
function truncate_float_point(number) =
|
||||
number >= 0 ? floor(number) : ceil(number);
|
||||
|
||||
function shift_to_int(pt, n) =
|
||||
function shift_to_int(pt) =
|
||||
len(pt) == 2 ?
|
||||
[truncate_float_point(pt[0] * n), truncate_float_point(pt[1] * n)] :
|
||||
[truncate_float_point(pt[0] * n), truncate_float_point(pt[1] * n), truncate_float_point(pt[2] * n)];
|
||||
[truncate_float_point(pt[0]), truncate_float_point(pt[1])] :
|
||||
[truncate_float_point(pt[0]), truncate_float_point(pt[1]), truncate_float_point(pt[2])];
|
||||
|
||||
shifted_expected = shift_to_int(
|
||||
expected,
|
||||
n
|
||||
expected * n
|
||||
);
|
||||
|
||||
shifted_actual = shift_to_int(
|
||||
actual,
|
||||
n
|
||||
actual * n
|
||||
);
|
||||
|
||||
if(shifted_expected != shifted_actual) {
|
||||
fail(
|
||||
str("expected: ", shifted_expected,
|
||||
", but: ", shifted_actual)
|
||||
str("expected: ", expected,
|
||||
", but: ", actual)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user