trying to trace why we're getting fractional
This commit is contained in:
parent
dd6135123c
commit
54cbc623fb
|
@ -1080,5 +1080,6 @@ EXPORTS['name->color'] =
|
||||||
1,
|
1,
|
||||||
function(MACHINE) {
|
function(MACHINE) {
|
||||||
var name = checkSymbolOrString(MACHINE, 'name->color', 0);
|
var name = checkSymbolOrString(MACHINE, 'name->color', 0);
|
||||||
return colorDb.get('' + name) || false;
|
var result = colorDb.get('' + name) || false;
|
||||||
|
return result;
|
||||||
});
|
});
|
|
@ -1075,7 +1075,7 @@
|
||||||
if (i >= 0 && i < vec.elts.length) {
|
if (i >= 0 && i < vec.elts.length) {
|
||||||
return vec.elts[i];
|
return vec.elts[i];
|
||||||
}
|
}
|
||||||
} else if (isNumber(i)) {
|
} else if (isNatural(i)) {
|
||||||
i = baselib.numbers.toFixnum(i);
|
i = baselib.numbers.toFixnum(i);
|
||||||
if (i >= 0 && i < vec.elts.length) {
|
if (i >= 0 && i < vec.elts.length) {
|
||||||
return vec.elts[i];
|
return vec.elts[i];
|
||||||
|
@ -1098,7 +1098,7 @@
|
||||||
vec.elts[i] = val;
|
vec.elts[i] = val;
|
||||||
return VOID;
|
return VOID;
|
||||||
}
|
}
|
||||||
} else if (isNumber(i)) {
|
} else if (isNatural(i)) {
|
||||||
i = baselib.numbers.toFixnum(i);
|
i = baselib.numbers.toFixnum(i);
|
||||||
if (i >= 0 && i < vec.elts.length) {
|
if (i >= 0 && i < vec.elts.length) {
|
||||||
vec.elts[i] = val;
|
vec.elts[i] = val;
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
(define (color-connected-points! imgvec width height start-color destination-color tolerance it)
|
(define (color-connected-points! imgvec width height start-color destination-color tolerance it)
|
||||||
(let ((mycol (vector-ref imgvec it)))
|
(let ((mycol (vector-ref imgvec it)))
|
||||||
|
(printf "~a ~a\n" mycol it)
|
||||||
(when (and (not (color=? mycol destination-color))
|
(when (and (not (color=? mycol destination-color))
|
||||||
(color-near? mycol start-color tolerance))
|
(color-near? mycol start-color tolerance))
|
||||||
(begin
|
(begin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user