So, with C# I am working with a dataset that contains a variable which can have a value of various ranges that I am unable to predetermine. The range is a value that can range from -x to x, with the median at 0, and x could be a range such as -15 to 15, or it could be -1 to 1. The data I receive is more based on the deviation from 0 than from the range min to the range max, and I believe this is vital to the formula.
I am trying to convert the range of -x to x, to be either in the range of 0 to 100, or -1 to 1, all while maintaining the original ratios. I have taken a look at Convert a number range to another range, maintaining ratio but the formulas there require a known and predetermined range min and max to start with. Math is certainly not my strong suit and I am at a total loss of how to convert this data, so any help here would be greatly appreciated.
If it does help any, the data I receive is in a list/array, something like:
x[]:{ 1.47f, 1.21f, 0.49f, -0.05f, -0.69f, -1.8f, -2.35f, -1.2f, -0.42f, 4.56f }