2024-12-01 19:35:24 +00:00
|
|
|
//| Copyright: (C) 2020-2024 Kevin Larke <contact AT larke DOT org>
|
|
|
|
//| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
|
2020-02-12 18:42:22 +00:00
|
|
|
#ifndef cwUtility_h
|
|
|
|
#define cwUtility_h
|
|
|
|
|
|
|
|
namespace cw
|
|
|
|
{
|
|
|
|
void printHex( const void* buf, unsigned bufByteN, bool asciiFl=true );
|
2020-09-01 19:46:21 +00:00
|
|
|
|
|
|
|
double x80ToDouble( unsigned char s[10] );
|
|
|
|
void doubleToX80( double v, unsigned char s[10] );
|
2020-10-04 14:47:03 +00:00
|
|
|
|
|
|
|
bool isPowerOfTwo( unsigned x );
|
|
|
|
unsigned nextPowerOfTwo( unsigned val );
|
|
|
|
unsigned nearestPowerOfTwo( unsigned val );
|
2020-02-12 18:42:22 +00:00
|
|
|
|
2020-10-04 14:47:03 +00:00
|
|
|
|
2020-02-12 18:42:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|