Asin

From Director Online Wiki
Jump to: navigation, search
--------------------------------------------
--Calculate arc sine
--------------------------------------------
on asin  ratio
  if ratio < 1 and ratio > -1 then
    return atan(ratio/sqrt(1.0 - (ratio * ratio)))
  else if ratio = 1 then
    return pi()/2
  else if ratio = -1 then
    return -pi()/2
  end if
end