*Strong Bad runs into the drive-thru whale*

This commit is contained in:
XANTRONIX Development 2019-05-26 11:18:31 -05:00
parent af3de09f10
commit ea7064e494

View file

@ -15,15 +15,15 @@ static void draw_needle(cairo_t *cr,
double min_angle,
double max_angle,
double value) {
double angle = min_angle + ((max_angle - min_angle) * value) - 90.0;
double angle = min_angle + ((max_angle - min_angle) * value) - (M_PI/2);
cairo_move_to(cr, x, y);
cairo_set_source_rgb(cr, 0, 0.25, 1.0);
cairo_line_to(cr,
x + r * cos((M_PI/180.0) * angle),
y + r * sin((M_PI/180.0) * angle));
x + r * cos(angle),
y + r * sin(angle));
cairo_stroke(cr);
}
@ -79,7 +79,7 @@ static void draw_tachometer(cairo_t *cr,
/*
* Draw a gauge needle
*/
draw_needle(cr, x, y, 0.77 * r, 232, 488, 0.0);
draw_needle(cr, x, y, 0.77 * r, 232 * (M_PI/180), 488 * (M_PI/180), 0.0);
/*
* Draw a tiny boi circle