⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 java_lang_math.properties

📁 hsqldb是100%java实现的数据库,是一个开放源代码的JAVA数据库 l 具有标准的SQL语法和JAVA接口 l HSQLDB可以自由使用和分发 l 非常简洁和快速的
💻 PROPERTIES
📖 第 1 页 / 共 2 页
字号:
round(float)=Returns the closest <code>int</code> to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type <code>int</code>. In other words, the result is equal to the value of the expression: <p><pre>(int)Math.floor(a + 0.5f)</pre> <p> Special cases: <ul><li>If the argument is NaN, the result is 0. <li>If the argument is negative infinity or any value less than or equal to the value of <code>Integer.MIN_VALUE</code>, the result is equal to the value of <code>Integer.MIN_VALUE</code>. <li>If the argument is positive infinity or any value greater than or equal to the value of <code>Integer.MAX_VALUE</code>, the result is equal to the value of <code>Integer.MAX_VALUE</code>.</ul>round(float)@0=the value of the argument rounded to the nearest <code>int</code> value.round(float)@1=a - a floating-point value to be rounded to an integer.round(double)=Returns the closest <code>long</code> to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type <code>long</code>. In other words, the result is equal to the value of the expression: <p><pre>(long)Math.floor(a + 0.5d)</pre> <p> Special cases: <ul><li>If the argument is NaN, the result is 0. <li>If the argument is negative infinity or any value less than or equal to the value of <code>Long.MIN_VALUE</code>, the result is equal to the value of <code>Long.MIN_VALUE</code>. <li>If the argument is positive infinity or any value greater than or equal to the value of <code>Long.MAX_VALUE</code>, the result is equal to the value of <code>Long.MAX_VALUE</code>.</ul>round(double)@0=the value of the argument rounded to the nearest <code>long</code> value.round(double)@1=a - a floating-point value to be rounded to a <code>long</code>.random()=Returns a <code>double</code> value with a positive sign, greater than or equal to <code>0.0</code> and less than <code>1.0</code>. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range. <p> When this method is first called, it creates a single new pseudorandom-number generator, exactly as if by the expression <blockquote><pre>new java.util.Random</pre></blockquote> This new pseudorandom-number generator is used thereafter for all calls to this method and is used nowhere else. <p> This method is properly synchronized to allow correct use by more than one thread. However, if many threads need to generate pseudorandom numbers at a great rate, it may reduce contention for each thread to have its own pseudorandom-number generator.random()@0=a pseudorandom <code>double</code> greater than or equal to <code>0.0</code> and less than <code>1.0</code>.abs(int)=Returns the absolute value of an <code>int</code> value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. <p> Note that if the argument is equal to the value of <code>Integer.MIN_VALUE</code>, the most negative representable <code>int</code> value, the result is that same value, which is negative.abs(int)@0=the absolute value of the argument.abs(int)@1=a - the argument whose absolute value is to be determinedabs(long)=Returns the absolute value of a <code>long</code> value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. <p> Note that if the argument is equal to the value of <code>Long.MIN_VALUE</code>, the most negative representable <code>long</code> value, the result is that same value, which is negative.abs(long)@0=the absolute value of the argument.abs(long)@1=a - the argument whose absolute value is to be determinedabs(float)=Returns the absolute value of a <code>float</code> value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: <ul><li>If the argument is positive zero or negative zero, the result is positive zero. <li>If the argument is infinite, the result is positive infinity. <li>If the argument is NaN, the result is NaN.</ul> In other words, the result is the same as the value of the expression: <p><pre>Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))</pre>abs(float)@0=the absolute value of the argument.abs(float)@1=a - the argument whose absolute value is to be determinedabs(double)=Returns the absolute value of a <code>double</code> value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: <ul><li>If the argument is positive zero or negative zero, the result is positive zero. <li>If the argument is infinite, the result is positive infinity. <li>If the argument is NaN, the result is NaN.</ul> In other words, the result is the same as the value of the expression: <p><code>Double.longBitsToDouble((Double.doubleToLongBits(a)&lt;&lt;1)&gt;&gt;&gt;1)</code>abs(double)@0=the absolute value of the argument.abs(double)@1=a - the argument whose absolute value is to be determinedmax(int,int)=Returns the greater of two <code>int</code> values. That is, the result is the argument closer to the value of <code>Integer.MAX_VALUE</code>. If the arguments have the same value, the result is that same value.max(int,int)@0=the larger of <code>a</code> and <code>b</code>.max(int,int)@1=a - an argument.max(int,int)@2=b - another argument.max(long,long)=Returns the greater of two <code>long</code> values. That is, the result is the argument closer to the value of <code>Long.MAX_VALUE</code>. If the arguments have the same value, the result is that same value.max(long,long)@0=the larger of <code>a</code> and <code>b</code>.max(long,long)@1=a - an argument.max(long,long)@2=b - another argument.max(float,float)=Returns the greater of two <code>float</code> values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.max(float,float)@0=the larger of <code>a</code> and <code>b</code>.max(float,float)@1=a - an argument.max(float,float)@2=b - another argument.max(double,double)=Returns the greater of two <code>double</code> values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.max(double,double)@0=the larger of <code>a</code> and <code>b</code>.max(double,double)@1=a - an argument.max(double,double)@2=b - another argument.min(int,int)=Returns the smaller of two <code>int</code> values. That is, the result the argument closer to the value of <code>Integer.MIN_VALUE</code>. If the arguments have the same value, the result is that same value.min(int,int)@0=the smaller of <code>a</code> and <code>b</code>.min(int,int)@1=a - an argument.min(int,int)@2=b - another argument.min(long,long)=Returns the smaller of two <code>long</code> values. That is, the result is the argument closer to the value of <code>Long.MIN_VALUE</code>. If the arguments have the same value, the result is that same value.min(long,long)@0=the smaller of <code>a</code> and <code>b</code>.min(long,long)@1=a - an argument.min(long,long)@2=b - another argument.min(float,float)=Returns the smaller of two <code>float</code> values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.min(float,float)@0=the smaller of <code>a</code> and <code>b.</code>min(float,float)@1=a - an argument.min(float,float)@2=b - another argument.min(double,double)=Returns the smaller of two <code>double</code> values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.min(double,double)@0=the smaller of <code>a</code> and <code>b</code>.min(double,double)@1=a - an argument.min(double,double)@2=b - another argument.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -