00001 /* centering3x3.h 00002 */ 00003 #ifndef OSL_CENTERING3X3_H 00004 #define OSL_CENTERING3X3_H 00005 00006 #include "osl/container.h" 00007 00008 namespace osl 00009 { 00013 struct Centering3x3 00014 { 00015 struct Table 00016 { 00017 CArray<Square,Square::SIZE> centers; 00018 void init(); 00019 }; 00020 static const Square adjustCenterNaive(Square); 00021 static Table table; 00022 static const Square adjustCenter(Square src) 00023 { 00024 return table.centers[src.index()]; 00025 } 00026 }; 00027 00028 } // namespace osl 00029 00030 #endif /* OSL_CENTERING3X3_H */ 00031 // ;;; Local Variables: 00032 // ;;; mode:c++ 00033 // ;;; c-basic-offset:2 00034 // ;;; coding:utf-8 00035 // ;;; End: