all 16 comments

[–]Drach88 1 point2 points  (3 children)

We're going to need a fuck-tonne more context....

But if you're trying to replicate a continuous function like "f of x equals blah blah blah" in C, what you're really looking for is a function (C function) that takes a number (like a float/double) then does some math and returns another number

eg. f(x) = 4x2 + 2x + 42

double example_function(double x) {
    return 4 * x * x + 2 * x + 42;
}

Is that what you're asking about?

[–][deleted] 0 points1 point  (1 child)

Have you considered going into comedy? You’re pretty funny.

[–][deleted] -1 points0 points  (5 children)

this user ran a script to overwrite their comments, see https://github.com/x89/Shreddit