Skip to content

Instantly share code, notes, and snippets.

View giskook's full-sized avatar
🎯
Focusing

zhangkai giskook

🎯
Focusing
View GitHub Profile
@giskook
giskook / ffr.c
Created December 26, 2013 06:18 — forked from cloudwu/ffr.c
#include <stdint.h>
#include <stdlib.h>
// assert(RAND_MAX >= 0x7fff)
float
random_0_to_1() {
union {
uint32_t d;
float f;
} u;
@giskook
giskook / ffr.c
Created December 26, 2013 06:17 — forked from cloudwu/ffr.c
#include <stdint.h>
#include <stdlib.h>
// assert(RAND_MAX >= 0x7fff)
float
random_0_to_1() {
union {
uint32_t d;
float f;
} u;