Changeset 8667


Ignore:
Timestamp:
Jan 3, 2012 3:52:42 PM (4 years ago)
Author:
pramsey
Message:

Change to GNU macro NAN. Still not feeling The Confidence.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/liblwgeom/lwgeodetic.c

    r8665 r8667  
    18711871        if ( FP_EQUALS(x1, x2) && FP_EQUALS(y1, y2) )
    18721872        {
    1873                 return nan("");
     1873                return NAN;
    18741874        }
    18751875       
  • trunk/liblwgeom/lwgeodetic.h

    r8053 r8667  
    1111
    1212#include "liblwgeom_internal.h"
     13
     14/* For NAN */
     15#define _GNU_SOURCE
     16#include <math.h>
     17
     18#ifndef NAN
     19#define NAN 0.0/0.0
     20#endif
    1321
    1422extern int gbox_geocentric_slow;
  • trunk/regress/tickets.sql

    r8655 r8667  
    479479WITH pts AS ( SELECT 'POINT(0 45)'::geography AS s, 'POINT(45 45)'::geography AS e )
    480480SELECT '#1305.2',abs(ST_Distance(e, ST_Project(s, ST_Distance(s, e), ST_Azimuth(s, e)))) < 0.001 FROM pts;
     481SELECT '#1305.3',ST_Azimuth('POINT(0 45)'::geography, 'POINT(0 45)'::geography) IS NULL;
    481482
    482483-- Clean up
  • trunk/regress/tickets_expected

    r8655 r8667  
    149149#1305.1|POINT(10 10)
    150150#1305.2|t
     151#1305.3|t
Note: See TracChangeset for help on using the changeset viewer.