Diff of /trunk/src/icons.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by harbaum, Sat Jun 20 11:08:47 2009 UTC revision 47 by harbaum, Thu Aug 6 20:23:12 2009 UTC
# Line 210  GtkWidget *icon_get_widget(int type, int Line 210  GtkWidget *icon_get_widget(int type, int
210  }  }
211    
212  GdkPixbuf *icon_bearing(pos_t from, pos_t to) {  GdkPixbuf *icon_bearing(pos_t from, pos_t to) {
213    if(!from.lat && !from.lon)    if(isnan(from.lat) || isnan(from.lon) ||
214         isnan(to.lat) || isnan(to.lon))
215      return icon_get(ICON_HEADING, 8);      return icon_get(ICON_HEADING, 8);
216    
217    int idx = (gpx_pos_get_bearing(from, to)+22.5)/45.0;    int idx = (gpx_pos_get_bearing(from, to)+22.5)/45.0;

Legend:
Removed from v.1  
changed lines
  Added in v.47