Skip to content

Instantly share code, notes, and snippets.

// main - commit 100
void Foo() {
Console.WriteLine("My horrible func");
}
void Bar() {
Foo();
}
@danstur
danstur / Float.java
Created May 2, 2019 16:49
Counts the number of floating point values in [0,0.5) and [0.5,1).
private static int count(float start, float end) {
int count = 0;
float val = start;
while (val < end) {
count++;
val = Math.nextAfter(val, 1);
}
return count;
}