1 /*****************************************************************************/
5 /* Optimized math routines for special usages */
9 /* (C) 2019 Christian 'Irgendwer' Krueger */
11 /* This software is provided 'as-is', without any expressed or implied */
12 /* warranty. In no event will the authors be held liable for any damages */
13 /* arising from the use of this software. */
15 /* Permission is granted to anyone to use this software for any purpose, */
16 /* including commercial applications, and to alter it and redistribute it */
17 /* freely, subject to the following restrictions: */
19 /* 1. The origin of this software must not be misrepresented; you must not */
20 /* claim that you wrote the original software. If you use this software */
21 /* in a product, an acknowledgment in the product documentation would be */
22 /* appreciated but is not required. */
23 /* 2. Altered source versions must be plainly marked as such, and must not */
24 /* be misrepresented as being the original software. */
25 /* 3. This notice may not be removed or altered from any source */
28 /*****************************************************************************/
30 #ifndef _SPECIALMATH_H
31 #define _SPECIALMATH_H
34 /* Multiply an 8 bit unsigned value by 20 and return the 16 bit unsigned result */
36 unsigned int __fastcall__ mul20(unsigned char value);
39 /* Multiply an 8 bit unsigned value by 40 and return the 16 bit unsigned result */
41 unsigned int __fastcall__ mul40(unsigned char value);
45 /* End of specialmath.h */