Sigrid Solveig Haflínudóttirmore correct round()46f9c395 years agoHistory
35 lines · 683 B · C
RawDownload
#ifdef __plan9__#include <u.h>#include <libc.h>#include <stdio.h>typedef s64int int64_t;typedef u32int uint32_t;typedef s32int int32_t;typedef u16int uint16_t;typedef s16int int16_t;typedef u8int uint8_t;typedef s8int int8_t;typedef ulong size_t;typedef enum { false, true } bool;#define lockMixer()#define unlockMixer()#define openMixer(f,s) true#define closeMixer()static doubleround(double d){	double f = modf(d, &d);	if(f == 0.0 || d == 0.0)		return d;	return d > 0 ? d+1 : d-1;}#else#include <assert.h>#include <math.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#define USED(x) (void)x#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t