Pikchr

Check-in [ca92b3a952]
Login
Overview
Comment:Allow any value for HEADING. Convert it to -360..360 before use. Forum post 56140a59018db001
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ca92b3a9527376c814441cf2ad1778550ab63703f91f74f02dda75890cd66f18
User & Date: drh 2022-07-28 14:40:43
Original Comment: Allow any value for HEADING. Convert it to 0..360 before use. [Forum post 56140a59018db001|/info/56140a59018db001]
References
2022-07-28
14:42 Reply: Modulo-Angle (artifact: 04704fe26e user: drh)
Context
2022-07-28
18:44
Changed the /fiddle build to name the output files pikchr.js/wasm instead of fiddle-module.js/wasm to avoid having to make manual edits when porting them over to fossil. (check-in: 77485e8ed8 user: stephan tags: trunk)
14:40
Allow any value for HEADING. Convert it to -360..360 before use. Forum post 56140a59018db001 (check-in: ca92b3a952 user: drh tags: trunk)
00:32
Add Ryan's spider-web Pikchr script as an example. (check-in: ce9880de2f user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pikchr.c.

5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
    return;
  }
  pik_reset_samepath(p);
  do{
    n = pik_next_rpath(p, pErr);
  }while( n<1 );
  if( pHeading ){
    if( rHdg<0.0 || rHdg>360.0 ){
      pik_error(p, pHeading, "headings should be between 0 and 360");
      return;
    }
  }else if( pEdgept->eEdge==CP_C ){
    pik_error(p, pEdgept, "syntax error");
    return;
  }else{
    rHdg = pik_hdg_angle[pEdgept->eEdge];
  }
  if( rHdg<=45.0 ){







|
<
<
<







5834
5835
5836
5837
5838
5839
5840
5841



5842
5843
5844
5845
5846
5847
5848
    return;
  }
  pik_reset_samepath(p);
  do{
    n = pik_next_rpath(p, pErr);
  }while( n<1 );
  if( pHeading ){
    rHdg = fmod(rHdg,360.0);



  }else if( pEdgept->eEdge==CP_C ){
    pik_error(p, pEdgept, "syntax error");
    return;
  }else{
    rHdg = pik_hdg_angle[pEdgept->eEdge];
  }
  if( rHdg<=45.0 ){
8130
8131
8132
8133
8134
8135
8136
8137
  return TCL_OK;
}


#endif /* PIKCHR_TCL */


#line 8162 "pikchr.c"







|
8127
8128
8129
8130
8131
8132
8133
8134
  return TCL_OK;
}


#endif /* PIKCHR_TCL */


#line 8159 "pikchr.c"

Changes to pikchr.y.

3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
    return;
  }
  pik_reset_samepath(p);
  do{
    n = pik_next_rpath(p, pErr);
  }while( n<1 );
  if( pHeading ){
    if( rHdg<0.0 || rHdg>360.0 ){
      pik_error(p, pHeading, "headings should be between 0 and 360");
      return;
    }
  }else if( pEdgept->eEdge==CP_C ){
    pik_error(p, pEdgept, "syntax error");
    return;
  }else{
    rHdg = pik_hdg_angle[pEdgept->eEdge];
  }
  if( rHdg<=45.0 ){







|
<
<
<







3226
3227
3228
3229
3230
3231
3232
3233



3234
3235
3236
3237
3238
3239
3240
    return;
  }
  pik_reset_samepath(p);
  do{
    n = pik_next_rpath(p, pErr);
  }while( n<1 );
  if( pHeading ){
    rHdg = fmod(rHdg,360.0);



  }else if( pEdgept->eEdge==CP_C ){
    pik_error(p, pEdgept, "syntax error");
    return;
  }else{
    rHdg = pik_hdg_angle[pEdgept->eEdge];
  }
  if( rHdg<=45.0 ){