PIKApp/app/core/pikacoords.h

62 lines
2.7 KiB
C

/* PIKA - Photo and Image Kooker Application
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* pikacoords.h
* Copyright (C) 2002 Simon Budig <simon@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_COORDS_H__
#define __PIKA_COORDS_H__
void pika_coords_mix (const gdouble amul,
const PikaCoords *a,
const gdouble bmul,
const PikaCoords *b,
PikaCoords *ret_val);
void pika_coords_average (const PikaCoords *a,
const PikaCoords *b,
PikaCoords *ret_average);
void pika_coords_add (const PikaCoords *a,
const PikaCoords *b,
PikaCoords *ret_add);
void pika_coords_difference (const PikaCoords *a,
const PikaCoords *b,
PikaCoords *difference);
void pika_coords_scale (const gdouble f,
const PikaCoords *a,
PikaCoords *ret_product);
gdouble pika_coords_scalarprod (const PikaCoords *a,
const PikaCoords *b);
gdouble pika_coords_length (const PikaCoords *a);
gdouble pika_coords_length_squared (const PikaCoords *a);
gdouble pika_coords_manhattan_dist (const PikaCoords *a,
const PikaCoords *b);
gboolean pika_coords_equal (const PikaCoords *a,
const PikaCoords *b);
gdouble pika_coords_direction (const PikaCoords *a,
const PikaCoords *b);
#endif /* __PIKA_COORDS_H__ */