xref: /aoo42x/main/vcl/inc/aqua/salmathutils.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SV_SALMATHUTILS_HXX
29 #define _SV_SALMATHUTILS_HXX
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 // ------------------------------------------------------------------
36 //
37 //                            Structures
38 //
39 // ------------------------------------------------------------------
40 
41 // LRectCoor is an abreviation for rectangular coordinates
42 // represented as long integers
43 
44 struct LRectCoor
45 {
46 	long  x;
47 	long  y;
48 	long  z;
49 };
50 
51 // ------------------------------------------------------------------
52 //
53 //                       Type Definitions
54 //
55 // ------------------------------------------------------------------
56 
57 // LRectCoorVec is an abreviation for vectors in rectangular
58 // coordinates represented as long integers
59 
60 typedef struct LRectCoor   LRectCoor;
61 typedef LRectCoor         *LRectCoorVector;
62 typedef LRectCoorVector   *LRectCoorTensor;
63 
64 // ------------------------------------------------------------------
65 //
66 //                      Function Headers
67 //
68 // ------------------------------------------------------------------
69 
70 void CSwap  ( char            &rX, char            &rY );
71 void UCSwap ( unsigned char   &rX, unsigned char   &rY );
72 void SSwap  ( short           &rX, short           &rY );
73 void USSwap ( unsigned short  &rX, unsigned short  &rY );
74 void LSwap  ( long            &rX, long            &rY );
75 void ULSwap ( unsigned long   &rX, unsigned long   &rY );
76 
77 // ------------------------------------------------------------------
78 
79 unsigned long  Euclidian2Norm ( const LRectCoorVector  pVec );
80 
81 // ------------------------------------------------------------------
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif	// _SV_SALMATHUTILS_HXX
88