Even distribution between two float from center of two floats?

I need to distribute a variable number of float values between to other fixed float values, with the distribution starting from the the center point between those fixed values.

So something like:

f1 ---- n1 ---- f2

f1 – n1 – n2 – f2

f1 - n2 - n1 - n3 - f2

What would be the best way to go about this?

This is basic maths:

f1+ ((f2-f1)/numPoints)*i
where i is the index of your point