xref: /aoo42x/main/vcl/inc/aqua/salmathutils.hxx (revision ebfcd9af)
1*ebfcd9afSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ebfcd9afSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ebfcd9afSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ebfcd9afSAndrew Rist  * distributed with this work for additional information
6*ebfcd9afSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ebfcd9afSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ebfcd9afSAndrew Rist  * "License"); you may not use this file except in compliance
9*ebfcd9afSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ebfcd9afSAndrew Rist  *
11*ebfcd9afSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ebfcd9afSAndrew Rist  *
13*ebfcd9afSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ebfcd9afSAndrew Rist  * software distributed under the License is distributed on an
15*ebfcd9afSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ebfcd9afSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ebfcd9afSAndrew Rist  * specific language governing permissions and limitations
18*ebfcd9afSAndrew Rist  * under the License.
19*ebfcd9afSAndrew Rist  *
20*ebfcd9afSAndrew Rist  *************************************************************/
21*ebfcd9afSAndrew Rist 
22*ebfcd9afSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_SALMATHUTILS_HXX
25cdf0e10cSrcweir #define _SV_SALMATHUTILS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifdef __cplusplus
28cdf0e10cSrcweir extern "C" {
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // ------------------------------------------------------------------
32cdf0e10cSrcweir //
33cdf0e10cSrcweir //                            Structures
34cdf0e10cSrcweir //
35cdf0e10cSrcweir // ------------------------------------------------------------------
36cdf0e10cSrcweir 
37cdf0e10cSrcweir // LRectCoor is an abreviation for rectangular coordinates
38cdf0e10cSrcweir // represented as long integers
39cdf0e10cSrcweir 
40cdf0e10cSrcweir struct LRectCoor
41cdf0e10cSrcweir {
42cdf0e10cSrcweir 	long  x;
43cdf0e10cSrcweir 	long  y;
44cdf0e10cSrcweir 	long  z;
45cdf0e10cSrcweir };
46cdf0e10cSrcweir 
47cdf0e10cSrcweir // ------------------------------------------------------------------
48cdf0e10cSrcweir //
49cdf0e10cSrcweir //                       Type Definitions
50cdf0e10cSrcweir //
51cdf0e10cSrcweir // ------------------------------------------------------------------
52cdf0e10cSrcweir 
53cdf0e10cSrcweir // LRectCoorVec is an abreviation for vectors in rectangular
54cdf0e10cSrcweir // coordinates represented as long integers
55cdf0e10cSrcweir 
56cdf0e10cSrcweir typedef struct LRectCoor   LRectCoor;
57cdf0e10cSrcweir typedef LRectCoor         *LRectCoorVector;
58cdf0e10cSrcweir typedef LRectCoorVector   *LRectCoorTensor;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir // ------------------------------------------------------------------
61cdf0e10cSrcweir //
62cdf0e10cSrcweir //                      Function Headers
63cdf0e10cSrcweir //
64cdf0e10cSrcweir // ------------------------------------------------------------------
65cdf0e10cSrcweir 
66cdf0e10cSrcweir void CSwap  ( char            &rX, char            &rY );
67cdf0e10cSrcweir void UCSwap ( unsigned char   &rX, unsigned char   &rY );
68cdf0e10cSrcweir void SSwap  ( short           &rX, short           &rY );
69cdf0e10cSrcweir void USSwap ( unsigned short  &rX, unsigned short  &rY );
70cdf0e10cSrcweir void LSwap  ( long            &rX, long            &rY );
71cdf0e10cSrcweir void ULSwap ( unsigned long   &rX, unsigned long   &rY );
72cdf0e10cSrcweir 
73cdf0e10cSrcweir // ------------------------------------------------------------------
74cdf0e10cSrcweir 
75cdf0e10cSrcweir unsigned long  Euclidian2Norm ( const LRectCoorVector  pVec );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir // ------------------------------------------------------------------
78cdf0e10cSrcweir 
79cdf0e10cSrcweir #ifdef __cplusplus
80cdf0e10cSrcweir }
81cdf0e10cSrcweir #endif
82cdf0e10cSrcweir 
83cdf0e10cSrcweir #endif	// _SV_SALMATHUTILS_HXX
84