Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: e92df064b0
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (15 sloc) 0.34 kB
#include <stdio.h>
void EvalFuncOnGrid( double(^block)(float) ) {
int i;
for ( i = 0; i < 5 ; ++i ) {
float x = i * 0.1;
printf("%f %f\n", x, block(x));
}
}
void Caller(void) {
float forceConst = 3.445;
EvalFuncOnGrid(^(float x){ return 0.5 * forceConst * x * x; });
}
int main(void) {
Caller();
}
Jump to Line
Something went wrong with that request. Please try again.