Public feed #529013

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-06-01 19:24 UTC
rendered paste body
// Set min to the least of tmp1, tmp2 and tmp3
// and set flags to indicate which one was the 
// least one. DELETE indicates tmp1, INSERT indicates tmp2,
// ALIGN indicates tmp3.

min = tmp1;
flags = DELETE;

if (tmp2 < min) {
        min = tmp2;
        flags = INSERT;
} else if (tmp2 == min) {
        flags |= INSERT;
}

if (tmp3 < min) {
        min = tmp3;
        flags = ALIGN;
} else if (tmp3 == min) {
        flags |= ALIGN;
}