Answers for "what is the real value of Mathf.infinity"
http://answers.unity.com/questions/15399/what-is-the-real-value-of-mathfinfinity.html
The latest answers for the question "what is the real value of Mathf.infinity"Answer by weatxyz
http://answers.unity.com/answers/1155896/view.html
Looks like this post is old, but figured I'd add to this so people know exactly what Infinity is.
Infinity is the highest value that a floating point number can represent. Floating points are a little weird and complicated, but the formulas in the other posts calculate the highest possible value of a floating point number. float.MaxValue should actually be the same as Mathf.Infinity, but someone can correct me if I'm wrong.Wed, 16 Mar 2016 17:47:34 GMTweatxyzAnswer by Ashkan_gc
http://answers.unity.com/answers/15461/view.html
<p>ok the answer is
the infinity number is a constant representing the infinity and it's defined in the design of the floating point calculation hardware and is one of the many numbers that can be created using 32 bits. it's a normal 32 bit series of number but computer knows about it and knows it's infinity. in some computers infinity related calculations are software emulated but in most machines it's done in hardware. in high level languages compiler itself handles it but in older languages like see it's simply a macro and you really can assign it to a variable in assembly but when you do calculations on it the computer will produce correct results so infinity+1 = infinity. be careful it's not possible to check
if (a == float.posetiveInfinity) you should use functions like isInfinity to check for that.
when i said compiler handles it i meant that there are constant in the language itself that represent the infinity and -infinity and nan numbers so you don't need to know the set of bits that they mean INF or -INF. for having negative zero you can just type -0.
don't worry about infinity because you can not assign it using numeric literals and there is not any way to get infinity as a result from a+b :)</p>Mon, 19 Apr 2010 11:08:39 GMTAshkan_gcAnswer by duck
http://answers.unity.com/answers/15405/view.html
<p>As far as I'm aware, Mathf.Infinity simply <em>doesn't have</em> a "normal" numerical equivalent, so no - it's not possible to assign it using a numeric literal. </p>
<p>You can directly assign it to a variable using the Mathf.Infinity constant, or you can have it returned as a result of by dividing by zero, or by exceeding <a href="http://msdn.microsoft.com/en-us/library/system.single.maxvalue.aspx" rel="nofollow">float.MaxValue</a> in an operation, however you can't subsequently subtract from this value to return to normal numeric values.</p>
<p>I can't really understand why you'd want to try and equate it with a real number, because then by definition it would not be infinity, it would be that number! I'm not sure whether you're trying to solve a particular problem, but it doesn't make sense to use anything other than the actual Infinity constant that is already provided.</p>
<p>Mathf.Infinity takes its value directly from <a href="http://msdn.microsoft.com/en-us/library/system.single.positiveinfinity%28v=VS.80%29.aspx" rel="nofollow">float.PositiveInfinity</a> which can be looked up in the MSDN reference. </p>
<p>PositiveInfinity is one of three "special values" that can be assigned to a float variable, in addition to the normal numeric range of values. </p>
<p>The other values are <a href="http://msdn.microsoft.com/en-us/library/system.single.negativeinfinity.aspx" rel="nofollow">NegativeInfinity</a> and <a href="http://msdn.microsoft.com/en-us/library/system.single.nan.aspx" rel="nofollow">Not a Number (NaN)</a> (these also do not have a real numeric value equivalent!).</p>Sun, 18 Apr 2010 16:11:07 GMTduckAnswer by matyicsapo
http://answers.unity.com/answers/15400/view.html
<p>visual c# says: 3.402823 * Mathf.Pow(10, 38)<br>
which unity too can handle as a number</p>
<p>unity regards this as inifinity: 3.402823 * Mathf.Pow(10, 39)<br>
(both using javascript or c#)</p>
<p>tried adding and subtracting ones from both but i couldn't get to infinity nor could i get away from it </p>
<p>(3.402823 * Mathf.Pow(10, 39)) - (3.402823 * Mathf.Pow(10, 38))<br>
is still infinity</p>
<p>so i assume you could use this number: 3.402823 * Mathf.Pow(10, 38)</p>Sun, 18 Apr 2010 14:36:13 GMTmatyicsapo