function stringToTypedArray( str, fixed_length )
{
	var r = new Uint8Array( fixed_length ? fixed_length : str.length);
	for(var i = 0; i < str.length; i++)
		r[i] = str.charCodeAt(i);
	return r;
}
Resamples a full curve in values (useful to upload to GPU array)

@namespace LS
@method resampleCurve
@param {Array} values 
@param {number} minx min x value
@param {number} maxx max x value
@param {number} defaulty default y value
@param {number} numsamples
@return {Array}