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

📄 round.java

📁 JAVA 数学程序库 提供常规的数值计算程序包
💻 JAVA
字号:
package jmathlib.toolbox.jmathlib.matrix;

import jmathlib.core.functions.ExternalElementWiseFunction;

public class round extends ExternalElementWiseFunction
{
    
    public round()
    {
        name = "round";
    }
    
    /**Standard functions - rounds the value to the nearest integer 
    @return the result as an OperandToken*/
    public double[] evaluateValue(double[] arg)
    {
        double[] result = new double[2];

        result[REAL] = Math.rint(arg[REAL]);
        result[IMAG] = Math.rint(arg[IMAG]);
        return  result;                      
    }

}

/*
@GROUP
general
@SYNTAX
answer = round(value)
@DOC
Rounds a value to the nearest integer.
@EXAMPLES
round(2.2) = 2
round(5.5) = 6
@SEE
ceil, floor
*/

⌨️ 快捷键说明

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