float.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="float" category="Built-In Types" version="3.1.2">
  3. <brief_description>
  4. Float built-in type
  5. </brief_description>
  6. <description>
  7. Float built-in type.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="float">
  13. <return type="float">
  14. </return>
  15. <argument index="0" name="from" type="bool">
  16. </argument>
  17. <description>
  18. Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0.
  19. </description>
  20. </method>
  21. <method name="float">
  22. <return type="float">
  23. </return>
  24. <argument index="0" name="from" type="int">
  25. </argument>
  26. <description>
  27. Cast an [int] value to a floating point value, [code]float(1)[/code] will be equal to 1.0.
  28. </description>
  29. </method>
  30. <method name="float">
  31. <return type="float">
  32. </return>
  33. <argument index="0" name="from" type="String">
  34. </argument>
  35. <description>
  36. Cast a [String] value to a floating point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001.
  37. </description>
  38. </method>
  39. </methods>
  40. <constants>
  41. </constants>
  42. </class>