How to convert double to int?

Hello,

i want to get a random number between 0 and 149. i used Math.random() function. i tried to convert to int which i get from this function but i couldnt get it as integer, i get it as double. i am going to use this variable in dataset-get action row property. Can you help me? Thanks.

This is the script:

var randomSayi = execution.getVariable("randomSayi");
randomSayi = Math.floor(Math.random() * 149);
randomSayi = parseInt(randomSayi);
execution.setVariable("randomSayi", randomSayi);

where i want to use:
image

error:

Cannot deserialize value of type java.lang.Integer from String "12.0": not a valid Integer value; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type java.lang.Integer from String "12.0": not a valid Integer value\n at [Source: (PushbackInputStream); line: 1, column: 29] (through reference chain: com.daphne.services.resultset.dto.ResultSetDTO["row"])“,“path”:”/resultset/get"}

Hello ,
Please use this script

randomSayi = Number(randomSayi).intValue();

it worked, thank you.