MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtlib_get_map_interval

Function gmtlib_get_map_interval

src/gmt_support.c:14807–14829  ·  view source on GitHub ↗

! . */

Source from the content-addressed store, hash-verified

14805
14806/*! . */
14807double gmtlib_get_map_interval (struct GMT_CTRL *GMT, unsigned int type, struct GMT_PLOT_AXIS_ITEM *T) {
14808 switch (T->unit) {
14809 case 'd': /* arc Degrees */
14810 return (T->interval);
14811 break;
14812 case 'm': /* arc Minutes */
14813 return (T->interval * GMT_MIN2DEG);
14814 break;
14815 case 'c': /* arc Seconds [deprecated] */
14816 if (gmt_M_compat_check (GMT, 4)) {
14817 GMT_Report (GMT->parent, GMT_MSG_COMPAT, "Second interval unit c is deprecated; use s instead\n");
14818 }
14819 else
14820 return (T->interval);
14821 /* Intentionally fall through - to 's' */
14822 case 's': /* arc Seconds or time seconds */
14823 return ((type == GMT_TIME) ? T->interval : T->interval * GMT_SEC2DEG);
14824 break;
14825 default:
14826 return (T->interval);
14827 break;
14828 }
14829}
14830
14831/*! . */
14832int gmt_just_validate (struct GMT_CTRL *GMT, char *key, char *def) {

Calls 1

GMT_ReportFunction · 0.85

Tested by

no test coverage detected