- 博客(4)
- 资源 (1)
- 收藏
- 关注
转载 二维数组排序 sort
#include #include #include using namespace std;bool cmp(int *p, int *q){if (p[0] == q[0]){if (p[1] == q[1]){return p[2]}else return p[1]}
2016-07-15 17:50:31 2939
转载 位运算
Bit Twiddling HacksBy Sean Eron Andersonseander@cs.stanford.eduIndividually, the code snippets here are in the public domain (unless otherwise noted) — feel free to use them however you please.
2016-07-08 17:35:58 708
转载 morton code 相关
#include stdio.h> #include stdlib.h> typedef unsigned int uint32; // "Insert" a 0 bit after each of the 16 low bits of x uint32 Pa
2016-07-08 16:41:21 1006
转载 morton codes
In case someone is using morton codes in 3d, so he needs to read one bit every 3, and 64 bits here is the function I used:uint64_t morton3(uint64_t x) { x = x & 0x9249249249249249; x = (x |
2016-07-08 15:06:04 996
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人