summaryrefslogtreecommitdiff
path: root/support/dktools/wxdarc.h
blob: 5a162007086137e7a1498b5d361df4e236ccbcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Copyright (C) 2017-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: wxdarc.ctr
*/

/**	@file wxdarc.h Header file for the wxdarc module.
*/

#ifndef WXDARC_H_INCLUDED
/** Avoid multiple inclusions. */
#define WXDARC_H_INCLUDED 1


#line 7 "wxdarc.ctr"

#include "dk4types.h"

#ifdef	__cplusplus
extern "C" {
#endif

/**	Arc calculation.
	For 3 given points (x1;y1), (x2;y2) and (x3;y3) calculate
	center point, radius, start and end angles and direction.
	If there is no solution or an infinite number of solutions,
	set the direction to 0. In this case drawing functions will draw
	two lines instead of an arc.
	@param	pxc	Address of result variable for center point x.
	@param	pyc	Address of result variable for center point y.
	@param	pr	Address of result variable for radius.
	@param	pa	Address of result variable for start angle in radians
				(-pi to pi).
	@param	pb	Address of result variable for end angle in radians
				(-5*pi to 5*pi).
	@param	pd	Address of result variable for direction.
	@param	x1	Point 1 x.
	@param	y1	Point 1 y.
	@param	x2	Point 2 x.
	@param	y2	Point 2 y.
	@param	x3	Point 3 x.
	@param	y3	Point 3 y.
*/
void
wxdarc_calculation(
	double	*pxc,
	double	*pyc,
	double	*pr,
	double	*pa,
	double	*pb,
	int8_t	*pd,
	int32_t	 x1,
	int32_t	 y1,
	int32_t	 x2,
	int32_t	 y2,
	int32_t	 x3,
	int32_t	 y3
);

#ifdef	__cplusplus
}
#endif



#endif