Getting error With Mathf.Ceil

Hi Guys I’ve been having a problem with a script the makes day and night cycle in unity this script is in java so here are the bits I’ve been having problems with :

var dayCycleLength : float = 1440;
var currentCycleTime : float = 0;
var hoursPerDay : float;
var dawnTimeOffset : float;  
var worldTimeHour : int; 
var minutes : int; 
var timePerHour : float;  

function UpdateWorldTime()  
    {  
        worldTimeHour = (int)((Mathf.Ceil((currentCycleTime / dayCycleLength) * hoursPerDay) + dawnTimeOffset) % hoursPerDay) + 1;  
        minutes = (int)(Mathf.Ceil((currentCycleTime* (60/timePerHour))% 60));  
    } 

this is actually a script made in C# that i’m trying to convert to .JS
So it gives me back this error :
BCE0024: The type ‘int’ does not have a visible constructor that matches the argument list ‘(float)’.

I really don’t know what to do please help me out!
Thanks already…

(int)foo in uJS is parseInt( foo )

(float)foo in uJS is parseFloat( foo )

for string you can use foo.ToString();

There is no uJS for Vector3 or boolean :frowning:

I asked : How to typecast from a PhotonStream to a variable type in uJS - Questions & Answers - Unity Discussions

worldTimeHour = parseInt( ((Mathf.Ceil((currentCycleTime / dayCycleLength) * hoursPerDay) + dawnTimeOffset) % hoursPerDay) + 1 );
minutes = parseInt( (Mathf.Ceil((currentCycleTime* (60/timePerHour))% 60)) );

Here’s some links I found useful in converting between C# and JS :