Skip to content

MathLiniarF does not use xCap #3

Description

@olafmersmann

Variable xCap is assigned but never used in in MathLiniarF.

I think the function was meant to be:

float MathLiniarF(const float yMinimum, const float yMaximum, 
                  const float xMinimum, const float xMaximum, 
                  const float xValue)
{
        const float xCap = xValue > xMinimum ? (xValue < xMaximum ? xValue : xMaximum) : xMinimum;
        const float slope = (xMaximum - xMinimum) / (yMaximum - yMinimum);

        return slope * (xCap - xMinimum) + yMinimum;
}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions