Java examples for java.lang:Math Geometry
Rotate angle by PI radians.
/**// w w w . j a va 2s. c o m * Copyright 1998-2007, CHISEL Group, University of Victoria, Victoria, BC, Canada. * All rights reserved. */ //package com.java2s; public class Main { /** * Rotate <code>angle</code> by PI radians. * @param angle a double value between PI and -PI * @return a double value between PI and -PI */ public static double rotateByPI(double angle) { if (angle > 0.0d) { return (angle - Math.PI); } return (angle + Math.PI); } }