Merge branch 'FF/MasterDevel' into FF/Ops

This commit is contained in:
Frank
2021-05-30 01:36:43 +02:00
14 changed files with 1927 additions and 708 deletions

View File

@@ -698,7 +698,10 @@ function UTILS.IsInSphere( InVec3, Vec3, Radius )
return InSphere
end
-- Beaufort scale: returns Beaufort number and wind description as a function of wind speed in m/s.
--- Beaufort scale: returns Beaufort number and wind description as a function of wind speed in m/s.
-- @param #number speed Wind speed in m/s.
-- @return #number Beaufort number.
-- @return #string Beauford wind description.
function UTILS.BeaufortScale(speed)
local bn=nil
local bd=nil
@@ -758,6 +761,21 @@ function UTILS.Split(str, sep)
return result
end
--- Get a table of all characters in a string.
-- @param #string str Sting.
-- @return #table Individual characters.
function UTILS.GetCharacters(str)
local chars={}
for i=1,#str do
local c=str:sub(i,i)
table.insert(chars, c)
end
return chars
end
--- Convert time in seconds to hours, minutes and seconds.
-- @param #number seconds Time in seconds, e.g. from timer.getAbsTime() function.
-- @param #boolean short (Optional) If true, use short output, i.e. (HH:)MM:SS without day.