Java algorithm for drawing a line
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));
}
}
Java algorithm for drawing a line
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));
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us