The following functions are defined in the LM namespace. To call one of these functions, be sure to prepend LM. to the function's name. For example, LM.Beep() is valid, while Beep() is not complete.
Causes to computer to beep.
Return value: noneCauses Moho to pause for the specified number of milliseconds.
milliseconds (int): duration to pause Return value: noneReturns the closest integer to the supplied value. In other words, value is rounded off.
value (float): a number to round Return value (int): closest integer to the value passed inClamps a value to ensure that it is within certain bounds. This function returns min if value is less than min, max if value is greater than max, and value otherwise.
value (float): a number to clamp min (float): minimum acceptable value max (float): maximum acceptable value Return value (float): the clamped valueThis function is a shortcut for linear interpolation between two numbers. If value is 0, then start is returned. If value is 1, end is returned. For anything in between, the function interpolates between start and end.
value (float): a number between (and including) 0 and 1 start (float): the starting value to interpolate end (float): the end value to interpolate Return value (float): a linear interpolation between start and endThis function is a shortcut for smooth interpolation between two numbers. If value is 0, then start is returned. If value is 1, end is returned. For anything in between, the function interpolates between start and end.
value (float): a number between (and including) 0 and 1 start (float): the starting value to interpolate end (float): the end value to interpolate Return value (float): a smooth interpolation between start and end