Radians.java :  » GWT » ghetto-maps » com » moesol » gwt » maps » client » units » Java Open Source

Java Open Source » GWT » ghetto maps 
ghetto maps » com » moesol » gwt » maps » client » units » Radians.java
package com.moesol.gwt.maps.client.units;

public class Radians implements AngleUnit {
  
  public static double asDegrees(double r) {
    return 180.0 * r/ Math.PI; 
  }

  @Override
  public double toDegrees(double v) {
    return asDegrees(v);
  }

  @Override
  public double toRadians(double v) {
    return v;
  }

  @Override
  public double fromDegrees(double v) {
    return Degrees.asRadians(v);
  }

  @Override
  public double fromRadians(double v) {
    return v;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.