- Home /
Question by
filler03 · Apr 15, 2012 at 11:01 PM ·
javascriptarrayvariable
what is the difference between a float[] and a float[,]?
This is probably a simple javascript question. I want to use the GetHeights function to use for generating terrain hights. i noticed this function returns a float[,] and am not sure what the comma in there means. Thank you for your help.
Comment
Best Answer
Answer by aldonaletto · Apr 15, 2012 at 11:18 PM
This means that the array returned has two dimensions - it's like a matrix, with columns and rows.
This function returns a rectangular portion of the entire height map:
function GetHeights (xBase : int, yBase : int, width : int, height : int) : float[,];
where xBase and yBase show the starting column/row, and width and height tell how much columns and rows will be returned.