mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
Added a fix to make sure that javascript division always uses floating point.
This commit is contained in:
parent
7a8c90e253
commit
671f5fbbdc
1 changed files with 1 additions and 1 deletions
|
|
@ -544,7 +544,7 @@ struct JavascriptEngine::RootObject : public DynamicObject
|
|||
{
|
||||
DivideOp (const CodeLocation& l, ExpPtr& a, ExpPtr& b) noexcept : BinaryOperator (l, a, b, TokenTypes::divide) {}
|
||||
var getWithDoubles (double a, double b) const override { return b != 0 ? a / b : std::numeric_limits<double>::infinity(); }
|
||||
var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a / b) : var (std::numeric_limits<double>::infinity()); }
|
||||
var getWithInts (int64 a, int64 b) const override { return b != 0 ? var (a / (double) b) : var (std::numeric_limits<double>::infinity()); }
|
||||
};
|
||||
|
||||
struct ModuloOp : public BinaryOperator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue