Jump to content

Photo

what does (...,-0.0001,0,0.0001,...) mean


  • Please log in to reply
3 replies to this topic

#1
dizietemblesssma

dizietemblesssma

    Faithful poster

  • Premium Member
  • 1,437 posts

Just recently I've come across something like the following when reading about variables or settings:

bSomeBoolean=(0,1)

 

meaning that the boolean in question is either 0 or 1 (false or true),

but what does:

fSomeFloat=(...,-0.0001,0,0.0001,...) mean?  In all cases I came across recently, the allowable values were magnitudes higher than 0.0001 so it doesn't seem to represent a range, and what are the ... either side? or the 0 in the middle?

 

diziet



#2
subhuman0100

subhuman0100

    Old hand

  • Members
  • PipPipPip
  • 935 posts


but what does:

fSomeFloat=(...,-0.0001,0,0.0001,...) mean?

I would interpret it to be the minimum values.  I.e. you can't assign 0.00009 to it- that would result in either an error or getting rounded to 0.0



#3
dizietemblesssma

dizietemblesssma

    Faithful poster

  • Premium Member
  • 1,437 posts

 


but what does:

fSomeFloat=(...,-0.0001,0,0.0001,...) mean?

I would interpret it to be the minimum values.  I.e. you can't assign 0.00009 to it- that would result in either an error or getting rounded to 0.0

 

That makes sense, would still make sense without the two ellipses on the ends though:)

Thanks.

 

diziet
 



#4
Rasikko

Rasikko

    The Arbiter of Time

  • Members
  • PipPipPipPip
  • 1,406 posts

From the wiki:
 


Float literals are sequences of digits (0 through 9) optionally prefixed by a minus sign, and followed by a dot and another sequence of digits. Floats are 32-bits in size, and have a range of 1.175494351 E – 38 to 3.402823466 E + 38 with 7 significant digits.


Edited by Rasikko, 06 March 2021 - 04:38 PM.





IPB skins by Skinbox
Page loaded in: 0.959 seconds