Skip to content

Commit

Permalink
fix: cast float to double
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeMoonki committed Aug 28, 2024
1 parent 0929232 commit 21301cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cxx/UnistylesImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ jsi::Value UnistylesRuntime::getNavigationBar(jsi::Runtime& rt, std::string fnNa
}

jsi::Value UnistylesRuntime::getPixelRatio(jsi::Runtime& rt, std::string fnName) {
return jsi::Value(roundf(this->pixelRatio * 100)/ 100);
return jsi::Value(static_cast<double>(roundf(this->pixelRatio * 100)/ 100));
}

jsi::Value UnistylesRuntime::getFontScale(jsi::Runtime& rt, std::string fnName) {
return jsi::Value(roundf(this->fontScale * 100) / 100);
return jsi::Value(static_cast<double>(roundf(this->fontScale * 100) / 100));
}

std::optional<jsi::Value> UnistylesRuntime::setThemes(jsi::Runtime& rt, const jsi::Value& value) {
Expand Down

0 comments on commit 21301cf

Please sign in to comment.