Java sqr sqr(int V)

Here you can find the source of sqr(int V)

Description

Returns the square of a number.

License

Open Source License

Declaration

public static int sqr(int V) 

Method Source Code

//package com.java2s;
/*/*from w w w.  j ava2s  .  com*/
 * BioAssay Ontology Annotator Tools
 * 
 * (c) 2014-2016 Collaborative Drug Discovery Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2.0
 * as published by the Free Software Foundation:
 * 
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */

public class Main {
    /**
     * Returns the square of a number. This is useful when the parameter is calculated in an expression.
     */
    public static int sqr(int V) {
        return V * V;
    }

    /**
     * Returns the square of a number. This is useful when the parameter is calculated in an expression.
     */
    public static float sqr(float V) {
        return V * V;
    }

    /**
     * Returns the square of a number. This is useful when the parameter is calculated in an expression.
     */
    public static double sqr(double V) {
        return V * V;
    }
}

Related

  1. sqr(double x)
  2. sqr(final float f)
  3. sqr(final int value)
  4. sqr(float a)
  5. sqr(float x)
  6. sqr(int x)
  7. sqr(int x)
  8. sqRightFunction(int databaseType, String expr, int length)
  9. sqrt(double a)