Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UnitCircle
- {
- public static void main(String[] args)
- {
- System.out.println("Radians: (cos, sin)");
- double angle = 0.0;
- double piDivideTwo = Math.PI/2.0;
- double pi = Math.PI;
- System.out.println(angle + ": " + Math.cos(angle) + ", " + Math.sin(angle) );
- double cosine = Math.cos(piDivideTwo);
- cosine = Math.round(cosine * 100) / 100.0;
- System.out.println(piDivideTwo + ": " + cosine +", " + Math.sin(piDivideTwo) );
- double sin = Math.sin(pi);
- sin = Math.round(sin *100) / 100.0;
- System.out.println(pi + ": " + Math.cos(pi) + ", " + sin );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement