From 65f43d0a4cfeb4771a4bbe39f6b729986575d96b Mon Sep 17 00:00:00 2001 From: zeroflag Date: Sun, 8 Aug 2021 12:34:02 +0200 Subject: [PATCH] delete button fix --- src/main/java/com/vectron/fcl/types/Num.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/vectron/fcl/types/Num.java b/src/main/java/com/vectron/fcl/types/Num.java index 20a70c8..f393bf7 100644 --- a/src/main/java/com/vectron/fcl/types/Num.java +++ b/src/main/java/com/vectron/fcl/types/Num.java @@ -269,4 +269,10 @@ public class Num implements Obj, LogicOperand, ArithmeticOperand { ? Double.compare(doubleValue(), ((Num) other).doubleValue()) : -1; } + + public boolean isReal() { + if (value instanceof Double) + return !((Double) value).isNaN() && !((Double) value).isInfinite(); + return true; + } }