Changeset 30480
- Timestamp:
- Feb 3, 2011, 9:36:49 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101205/Ohana/src/libohana
- Files:
-
- 2 edited
-
include/ohana.h (modified) (1 diff)
-
src/time.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/Ohana/src/libohana/include/ohana.h
r29537 r30480 286 286 int hstgsc_hms_to_deg PROTO((double *h0, double *h1, double *d0, double *d1, char *string)); 287 287 288 short ToShortPixels PROTO((float pixels)); 289 short ToShortDegrees PROTO((float degrees)); 290 float FromShortPixels PROTO((short value)); 291 float FromShortDegrees PROTO((float value)); 292 288 293 /* IO Buffer functions */ 289 294 int InitIOBuffer PROTO((IOBuffer *buffer, int Nalloc)); -
branches/eam_branches/ipp-20101205/Ohana/src/libohana/src/time.c
r19935 r30480 468 468 return (result); 469 469 } 470 471 short ToShortPixels (float pixels) { 472 473 short value; 474 475 value = 100*pixels; 476 477 return value; 478 } 479 480 short ToShortDegrees (float degrees) { 481 482 short value; 483 484 value = ((float)0xffff/360.0) * degrees; 485 486 return value; 487 } 488 489 float FromShortPixels (short value) { 490 491 float pixels; 492 493 pixels = value / 100.0; 494 495 return pixels; 496 } 497 498 float FromShortDegrees (float value) { 499 500 float degrees; 501 502 degrees = (360.0 / (float)0xffff) * value; 503 504 return degrees; 505 }
Note:
See TracChangeset
for help on using the changeset viewer.
