Example usage for java.lang Math PI

List of usage examples for java.lang Math PI

Introduction

In this page you can find the example usage for java.lang Math PI.

Prototype

double PI

To view the source code for java.lang Math PI.

Click Source Link

Document

The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.

Usage

From source file:Main.java

public static double change(double a) {
    return a * Math.PI / 180;
}

From source file:Main.java

public static double radToDig(double arg) {
    return (arg / Math.PI) * 180;
}

From source file:Main.java

public static double tile2lat(int y, int z) {
    double n = Math.PI - (2.0 * Math.PI * y) / Math.pow(2.0, z);
    return Math.toDegrees(Math.atan(Math.sinh(n)));
}

From source file:Main.java

public static double changeAngle(double a) {
    return a * 180 / Math.PI;
}

From source file:Main.java

public static double digToRad(double arg) {
    return (arg / 180) * Math.PI;
}

From source file:Main.java

public static double Degree2Ratio(double degree) {
    return degree * Math.PI / 180;
}

From source file:Main.java

public static double computeX(int centerX, int radius, double angle) {
    return centerX + radius * Math.cos(angle * Math.PI / 180);
}

From source file:Main.java

public static double Ratio2Degree(double ratio) {
    return ratio * 180 / Math.PI;
}

From source file:Main.java

private static float sweepArcAngle(double d) {
    return (float) (d * 180 / Math.PI);
}

From source file:Main.java

private static float startArcAngle(double i) {
    return (float) (i * 180 / Math.PI + 90);
}