Advertisement

Align function?

Started by July 22, 2000 03:11 PM
0 comments, last by Impaler 24 years, 5 months ago
Hi there, I want code an fast Align function, but my isnt fast here is the code snipped : inline C2D_uInt32 C2D_Align(C2D_uInt32 uiValue, C2D_uInt32 uiAlignment) { return (uiValue + (uiAlignment - (uiValue % uiAlignment)) ); } can anyone halp me to speed up this function ?? Thx Mfg Imp
I use Vc++ !
Use a macro.

#define ALIGN_VALUE(number, align) ((number+align) &~ align)

blazter

This topic is closed to new replies.

Advertisement