In javascript Number.isInteger() will return a boolean indicating whether or not the given value is an integer. **Is there an equivalent function in Painless I can call to test if a division calculation results in a whole number or another way to perform this test?**

E.g. if the calculation in my condition resulted in 1.0 it would return true, but if 1.1 it would return false.

Note: I don't want to enable regular expressions in scripts if it can be helped at this point.

Also Note: I'm multiplying the commonDifference and termValue by 1.0 because painless/Java does int division on integers and only returns an int even if there is a remainder and I need to evaluate if there is a remainder.

Another Note: This is arithmetic sequence math and I'm trying to determine if a certain value exists in a sequence.

I don't see any equivalent functions in the Integer or Double API, but maybe I missed some functions that may be useful for my use case. If it is not in the API, any bright ideas on how I can test if this is a whole number w/out regex?

```
"script": {
"source": """
def commonDifference = doc['repeated_every'].value * 1.0;
def termValue = params.term_value * 1.0 - 1;
if (Number.isInteger(termValue / commonDifference)) {
return true;
}
""",
"lang": "painless",
"params": {
"term_value": 6
}
}
```