📅  最后修改于: 2022-03-11 14:52:11.682000             🧑  作者: Mango
public final void drawLine(double x1, double y1, double x2, double y2) {
for (double x = x1; x < x2; x++) {
set(x, y1 + (y2 - y1) * (x - x1) / (x2 - x1));
}
}