Java Square square(final double num)

Here you can find the source of square(final double num)

Description

Simple square number, just num * num.

License

Open Source License

Parameter

Parameter Description
num number to square

Return

num * num

Declaration

public static double square(final double num) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from www  .ja  v  a 2 s .com
     * Simple square number, just num * num.
     *
     * @param num number to square
     *
     * @return num * num
     */
    public static double square(final double num) {
        return num * num;
    }

    /**
     * Simple square number, just num * num.
     *
     * @param num number to square
     *
     * @return num * num
     */
    public static int square(final int num) {
        return num * num;
    }

    /**
     * Simple square number, just num * num.
     *
     * @param num number to square
     *
     * @return num * num
     */
    public static long square(final long num) {
        return num * num;
    }
}

Related

  1. square(double a)
  2. square(double[] in, double[] out)
  3. square(double[][] m)
  4. square(float number, int power)
  5. square(int n)
  6. square(int value)