Exclude small exposure compensation values

This commit is contained in:
Sam Becker 2023-10-10 15:45:55 -05:00
parent fbdba04b3c
commit 53e6cb1da4

View File

@ -36,7 +36,10 @@ const fractionForDecimal = (decimal: number, fractionCharacter?: boolean) => {
};
export const formatExposureCompensation = (exposureCompensation?: number) => {
if (exposureCompensation) {
if (
exposureCompensation !== undefined &&
Math.abs(exposureCompensation) >= 0.33
) {
const decimal = exposureCompensation % 1;
const whole = Math.abs(exposureCompensation - decimal);
const fraction = fractionForDecimal(decimal);