It's not about math. It's about how to write C functions, which are fundamental building blocks.

For example, you said that the methods you wrote return void, and store their results in properties. So you apparently don't know how or why a method (or the simpler C function) would or should return a type other than void.

Taking your example:

here's the declaration of a C function:

Code:

float nashyo_x( float A, float B );

Here's the definition of the function:

Code:

float nashyo_x( float A, float B )
{ return -9 + 0.5 * A + 0.4 * B; }

I assume you know the C arithmetic operators, so the translation from (0.5A) to 0.5 * A should be obvious.

You call the function like this:

Code:

float my_x = nashyo_x( someAvalue, someBvalue );

where someAvalue is a variable already defined, whose value you wish to use in the calculation.

If anything above is either new or surprising to you, then you need to study what C functions are, and how to make them. Make sure you understand what the difference between a parameter or arg is, compared to a property or instance variable. You should also study how functions or methods return values, because if you define everything as a function or method returning void, you're missing half the point of functions and methods.

Once you know how C functions are defined, and how to call them, you should review how methods are defined and how they return values.