Java Square Calculate squared(int x)

Here you can find the source of squared(int x)

Description

squared

License

Apache License

Declaration

public static int squared(int x) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int squared(int x) {
        return (int) Math.round(Math.pow(x, x));
    }/*from www .  j  av  a 2  s  .c  o  m*/

    public static int pow(int x, int y) {
        return (int) Math.round(Math.pow(x, y));
    }
}

Related

  1. square2array(byte[][] square)
  2. square2Index(long square)
  3. squareArea(final double side)
  4. squaredError(double[] vector1, double[] vector2)
  5. squaredLoss(double[] x, double[] y, double w_0, double w_1)
  6. squaredNorm(final double[] vec)
  7. squareEntries(double[][] m)