Unofficial LSL Reference

[[types:float]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

types:float [2015-09-22 11:02 SLT]
sei
types:float [2015-09-22 11:28 SLT] (current)
sei missed styling a word
Line 2: Line 2:
 ===== Float type ===== ===== Float type =====
  
-The $ty[float] type represents a number with decimals, as opposed to the [[integer]] type which is for whole numbers only.+The $ty[float] type represents a number with decimals, as opposed to the $lty[integer] type which is for whole numbers only.
  
 Floating-point ($ty[float]) constants can be entered in two formats. The first is by just writing the number with its sign, the decimal point (mandatory for the constant to actually be a float and not an integer), and the decimals. For example, ''​3.7''​ or ''​-5.4164''​ are valid float constants. Neither the part to the left of the point nor the part to the right of the point are mandatory (e.g. ''​37.''​ or ''​-.25''​ are valid), but a point without any digits around it is not a valid floating-point constant. Floating-point ($ty[float]) constants can be entered in two formats. The first is by just writing the number with its sign, the decimal point (mandatory for the constant to actually be a float and not an integer), and the decimals. For example, ''​3.7''​ or ''​-5.4164''​ are valid float constants. Neither the part to the left of the point nor the part to the right of the point are mandatory (e.g. ''​37.''​ or ''​-.25''​ are valid), but a point without any digits around it is not a valid floating-point constant.