diff options
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r-- | LuaSL/src/LSL.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua index cc9b454..1e7cc13 100644 --- a/LuaSL/src/LSL.lua +++ b/LuaSL/src/LSL.lua | |||
@@ -311,6 +311,38 @@ function LSL.stateChange(x) | |||
311 | end | 311 | end |
312 | end; | 312 | end; |
313 | 313 | ||
314 | function LSL.floatTypecast(x) | ||
315 | local temp = tonumber(x) | ||
316 | if nil == temp then temp = 0 end | ||
317 | return temp; | ||
318 | end | ||
319 | |||
320 | function LSL.integerTypecast(x) | ||
321 | local temp = tonumber(x) | ||
322 | if nil == temp then temp = 0 end | ||
323 | return temp; | ||
324 | end | ||
325 | |||
326 | function LSL.keyTypecast(x) | ||
327 | return "" .. x; | ||
328 | end | ||
329 | |||
330 | function LSL.listTypecast(x) | ||
331 | return {x}; | ||
332 | end | ||
333 | |||
334 | function LSL.rotationTypecast(x) | ||
335 | return x; | ||
336 | end | ||
337 | |||
338 | function LSL.stringTypecast(x) | ||
339 | return "" .. x; | ||
340 | end | ||
341 | |||
342 | function LSL.vectorTypecast(x) | ||
343 | return x; | ||
344 | end | ||
345 | |||
314 | 346 | ||
315 | return LSL; | 347 | return LSL; |
316 | 348 | ||