use VIPS_PI instead of M_PI as the former is already defined, added missing includes with their macro protection
This commit is contained in:
parent
86a1a0a7e2
commit
256cf494a3
@ -267,7 +267,7 @@ vips_perlin_make_tables( void *client )
|
||||
int i;
|
||||
|
||||
for( i = 0; i < 256; i++ ) {
|
||||
double angle = 2 * M_PI * i / 256.0;
|
||||
double angle = 2 * VIPS_PI * i / 256.0;
|
||||
|
||||
vips_perlin_cos[i] = cos( angle );
|
||||
vips_perlin_sin[i] = sin( angle );
|
||||
|
@ -57,7 +57,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
@ -79,7 +79,7 @@ extern "C" {
|
||||
#define VIPS_ISINF( V ) isinf( V )
|
||||
#define VIPS_FLOOR( V ) floor( V )
|
||||
#define VIPS_CEIL( V ) ceil( V )
|
||||
#define VIPS_RINT( R ) rint( V )
|
||||
#define VIPS_RINT( V ) rint( V )
|
||||
#define VIPS_ROUND( V ) round( V )
|
||||
#define VIPS_FABS( V ) VIPS_ABS( V )
|
||||
#define VIPS_FMAX( A, B ) VIPS_MAX( A, B )
|
||||
|
@ -87,6 +87,7 @@
|
||||
|
||||
#ifdef OS_WIN32
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#endif /*OS_WIN32*/
|
||||
|
||||
void *
|
||||
|
@ -59,7 +59,12 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h>
|
||||
#endif /*HAVE_IO_H*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -48,6 +48,9 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif /*HAVE_UNISTD_H*/
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h>
|
||||
#endif /*HAVE_IO_H*/
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef OS_WIN32
|
||||
|
@ -165,7 +165,7 @@ im__make_blend_luts( void )
|
||||
return( -1 );
|
||||
|
||||
for( x = 0; x < BLEND_SIZE; x++ ) {
|
||||
double a = IM_PI * x / (BLEND_SIZE - 1.0);
|
||||
double a = VIPS_PI * x / (BLEND_SIZE - 1.0);
|
||||
|
||||
im__coef1[x] = (cos( a ) + 1.0) / 2.0;
|
||||
im__coef2[x] = 1.0 - im__coef1[x];
|
||||
|
Loading…
Reference in New Issue
Block a user