IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2009, 3:20:57 PM (17 years ago)
Author:
Paul Price
Message:

Wasn't printing negative sign when the degrees part was less than
unity (i.e., zero) because the zero was swallowing the negative.
Now print the negative (or positive) sign explicitly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r24419 r25131  
    450450        small = 3600.0 * coords;
    451451        small = (float)((int)(small * 1000.0)) / 1000.0;
    452         if (negative) {
    453             big *= -1;
    454         }
    455452        psString coordString = NULL;        // String with the coordinates in sexagesimal format
    456         psStringAppend(&coordString, "%d:%02d:%06.3f", big, medium, small);
     453        psStringAppend(&coordString, "%c%02d:%02d:%06.3f", negative ? '-' : '+', big, medium, small);
    457454        coordItem = psMetadataItemAllocStr(concept->name, concept->comment, coordString);
    458455        psFree(coordString);
Note: See TracChangeset for help on using the changeset viewer.