libgimpmath: #pragma once

This commit is contained in:
Michael Natterer 2025-07-13 12:27:58 +02:00
parent c71661bf24
commit 74bf171611
4 changed files with 6 additions and 27 deletions

View file

@ -18,9 +18,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_MATH_H__
#define __GIMP_MATH_H__
#pragma once
#include <math.h>
@ -41,10 +39,8 @@
#undef __GIMP_MATH_H_INSIDE__
G_BEGIN_DECLS
/**
* SECTION: gimpmath
* @title: GimpMath
@ -146,7 +142,4 @@ G_BEGIN_DECLS
**/
#define gimp_rad_to_deg(angle) ((angle) * 360.0 / (2.0 * G_PI))
G_END_DECLS
#endif /* __GIMP_MATH_H__ */

View file

@ -18,13 +18,10 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_MATH_TYPES_H__
#define __GIMP_MATH_TYPES_H__
#pragma once
#include <libgimpbase/gimpbasetypes.h>
G_BEGIN_DECLS
typedef struct _GimpMatrix2 GimpMatrix2;
@ -128,7 +125,4 @@ struct _GimpVector4
gdouble x, y, z, w;
};
G_END_DECLS
#endif /* __GIMP_MATH_TYPES_H__ */

View file

@ -19,13 +19,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_MATH_H_INSIDE__) && !defined (GIMP_MATH_COMPILATION)
#error "Only <libgimpmath/gimpmath.h> can be included directly."
#endif
#ifndef __GIMP_MATRIX_H__
#define __GIMP_MATRIX_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -151,7 +150,4 @@ gdouble gimp_matrix4_transform_point (const GimpMatrix4 *matrix,
gdouble *newy,
gdouble *newz);
G_END_DECLS
#endif /* __GIMP_MATRIX_H__ */

View file

@ -22,13 +22,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_MATH_H_INSIDE__) && !defined (GIMP_MATH_COMPILATION)
#error "Only <libgimpmath/gimpmath.h> can be included directly."
#endif
#ifndef __GIMP_VECTOR_H__
#define __GIMP_VECTOR_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -154,7 +153,4 @@ void gimp_vector_3d_to_2d (gint sx,
const GimpVector3 *vp,
const GimpVector3 *p);
G_END_DECLS
#endif /* __GIMP_VECTOR_H__ */