Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
util.h
Package: LegendOfMir2_Server020418.zip [view]
Upload User: szopptop
Upload Date: 2013-04-23
Package Size: 1047k
Code Size: 1k
Category:
Game Server Simulator
Development Platform:
Visual C++
- /*
- Utility Functions
- Date:
- 2001/02/15
- */
- #ifndef __ORZ_MISC_UTIL__
- #define __ORZ_MISC_UTIL__
- /*
- Useful Macros
- */
- #define _abs(a) (((a) < (0)) ? (-a) : (b))
- #define _swap(a, b) ((a) ^= (b) ^= (a) ^= (b))
- /*
- Number System Converting Functions
- */
- int _hextodec( char *hex, int len );
- void _dectohex( int dec, char *hex, int len );
- /*
- Number Maniplulation Functions
- */
- template< class TV, class TM >
- inline TV _rounddown( TV value, TM multiple )
- {
- return (value / multiple) * multiple;
- }
- template< class TV, class TM >
- inline TV _roundup( TV value, TM multiple )
- {
- return _rounddown( value, multiple ) + ((value % multiple) > 0 ? multiple : 0);
- }
- #endif