mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-15 06:07:33 +03:00
Move import math.h to ImagingPlatform
This commit is contained in:
parent
ff7c29ced9
commit
039869fe77
|
@ -85,8 +85,6 @@
|
||||||
|
|
||||||
#include "libImaging/Imaging.h"
|
#include "libImaging/Imaging.h"
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
|
||||||
#include <math.h>
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#undef VERBOSE
|
#undef VERBOSE
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "libImaging/Imaging.h"
|
#include "libImaging/Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#define MAX_INT32 2147483647.0
|
#define MAX_INT32 2147483647.0
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
/* 8 bits for result. Table can overflow [0, 1.0] range,
|
/* 8 bits for result. Table can overflow [0, 1.0] range,
|
||||||
so we need extra bits for overflow and negative values.
|
so we need extra bits for overflow and negative values.
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
|
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#define CEIL(v) (int)ceil(v)
|
#define CEIL(v) (int)ceil(v)
|
||||||
#define FLOOR(v) ((v) >= 0.0 ? (int)(v) : (int)floor(v))
|
#define FLOOR(v) ((v) >= 0.0 ? (int)(v) : (int)floor(v))
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingEffectMandelbrot(int xsize, int ysize, double extent[4], int quality) {
|
ImagingEffectMandelbrot(int xsize, int ysize, double extent[4], int quality) {
|
||||||
/* Generate a Mandelbrot set covering the given extent */
|
/* Generate a Mandelbrot set covering the given extent */
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include "math.h"
|
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingFill(Imaging im, const void *colour) {
|
ImagingFill(Imaging im, const void *colour) {
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI
|
|
||||||
#define M_PI 3.1415926535897932384626433832795
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
#define PY_SSIZE_T_CLEAN
|
#define PY_SSIZE_T_CLEAN
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/* Check that we have an ANSI compliant compiler */
|
/* Check that we have an ANSI compliant compiler */
|
||||||
#ifndef HAVE_PROTOTYPES
|
#ifndef HAVE_PROTOTYPES
|
||||||
#error Sorry, this library requires support for ANSI prototypes.
|
#error Sorry, this library requires support for ANSI prototypes.
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
ImagingPalette
|
ImagingPalette
|
||||||
ImagingPaletteNew(const char *mode) {
|
ImagingPaletteNew(const char *mode) {
|
||||||
/* Create a palette object */
|
/* Create a palette object */
|
||||||
|
|
|
@ -1428,7 +1428,6 @@ quantize(
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST_NEAREST_NEIGHBOUR
|
#ifdef TEST_NEAREST_NEIGHBOUR
|
||||||
#include <math.h>
|
|
||||||
{
|
{
|
||||||
uint32_t bestmatch, bestdist, dist;
|
uint32_t bestmatch, bestdist, dist;
|
||||||
HashTable *h2;
|
HashTable *h2;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#define ROUND_UP(f) ((int)((f) >= 0.0 ? (f) + 0.5F : (f) - 0.5F))
|
#define ROUND_UP(f) ((int)((f) >= 0.0 ? (f) + 0.5F : (f) - 0.5F))
|
||||||
|
|
||||||
UINT32
|
UINT32
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#define ROUND_UP(f) ((int)((f) >= 0.0 ? (f) + 0.5F : (f) - 0.5F))
|
#define ROUND_UP(f) ((int)((f) >= 0.0 ? (f) + 0.5F : (f) - 0.5F))
|
||||||
|
|
||||||
struct filter {
|
struct filter {
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#include "libImaging/Imaging.h"
|
#include "libImaging/Imaging.h"
|
||||||
#include "thirdparty/pythoncapi_compat.h"
|
#include "thirdparty/pythoncapi_compat.h"
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
/* compatibility wrappers (defined in _imaging.c) */
|
/* compatibility wrappers (defined in _imaging.c) */
|
||||||
extern int
|
extern int
|
||||||
PyImaging_CheckBuffer(PyObject *buffer);
|
PyImaging_CheckBuffer(PyObject *buffer);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user