MCPcopy Create free account
hub / github.com/audacity/audacity / ValueToPosition

Method ValueToPosition

src/widgets/ASlider.cpp:1479–1487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1477
1478
1479int LWSlider::ValueToPosition(float val)
1480{
1481 float fRange = mMaxValue - mMinValue;
1482 if (mOrientation == wxHORIZONTAL)
1483 return (int)rint((val - mMinValue) * mWidthX / fRange);
1484 else
1485 // low values at bottom
1486 return (int)rint((mMaxValue - val) * mHeightY / fRange);
1487}
1488
1489void LWSlider::SetSpeed(float speed)
1490{

Callers 4

DoHandleWheelRotationMethod · 0.45
FrequencyToPositionFunction · 0.45
FrequencyToPositionFunction · 0.45
UpdateMethod · 0.45

Calls 1

rintFunction · 0.50

Tested by 1

DoHandleWheelRotationMethod · 0.36