Skript

Skript

788k Downloads

Evenly Divisible has problems with decimals

Closed this issue ยท 2 comments

commented

Skript/Server Version

[Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[Skript] Server Version: 1.21.4-231-09e9afd (MC: 1.21.4)
[Skript] Skript Version: 2.11.0 (skriptlang-github)
[Skript] Installed Skript Addons:
[Skript] - SkBee v3.11.1 (https://github.com/ShaneBeee/SkBee)
[Skript] - skript-reflect v2.6 (https://github.com/SkriptLang/skript-reflect)
[Skript] Installed dependencies:
[Skript] - WorldGuard v7.0.13+82fdc65

Bug Description

Checking if a number is evenly divisible by a non whole number seems to not return true most the time even when the number is evenly divisible by said non whole number.

Expected Behavior

Should return as true, isn't returning as true.

Steps to Reproduce

command /test: trigger: broadcast "a" if 0.3 is evenly divisible by 0.1

Errors or Screenshots

Image

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

Can replicate on latest

commented

Likely due to floating point error. Marking as low due to many valid workarounds