Skip to content

Commit 67f9e06

Browse files
PeterStaevAlexander Vakrilov
authored andcommitted
fix normalisation formula (NativeScript#5979)
1 parent f371417 commit 67f9e06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tns-core-modules/image-source/image-source.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class ImageSource implements ImageSourceDefinition {
131131
}
132132

133133
if (quality) {
134-
quality = quality - 0 / (100 - 0); // Normalize quality on a scale of 0 to 1
134+
quality = (quality - 0) / (100 - 0); // Normalize quality on a scale of 0 to 1
135135
}
136136

137137
const data = getImageData(this.ios, format, quality);
@@ -149,7 +149,7 @@ export class ImageSource implements ImageSourceDefinition {
149149
}
150150

151151
if (quality) {
152-
quality = quality - 0 / (100 - 0); // Normalize quality on a scale of 0 to 1
152+
quality = (quality - 0) / (100 - 0); // Normalize quality on a scale of 0 to 1
153153
}
154154

155155
const data = getImageData(this.ios, format, quality);

0 commit comments

Comments
 (0)