Trigonometric functions: Difference between revisions

→‎{{header|Java}}: Changed the arc functions to print the answer in degrees and radians rather than use two different angles.
(→‎{{header|BASIC}}: Changed the arc functions to print the answer in degrees and radians rather than use two different angles.)
(→‎{{header|Java}}: Changed the arc functions to print the answer in degrees and radians rather than use two different angles.)
Line 131:
System.out.println(Math.tan(radians) + " " + Math.tan(degrees * Math.PI / 180));
//arcsine
double arcsin = Math.asin(radians);
System.out.println(Math.asin(radians)arcsin + " " + Math.asin(degreesarcsin * 180 / Math.PI / 180));
//arccosine
double arccos = Math.acos(radians);
System.out.println(Math.acos(radians)arccos + " " + Math.acos(degreesarccos * 180 / Math.PI / 180));
//arctangent
double arctan = Math.atan(radians);
System.out.println(Math.atan(radians)arctan + " " + Math.atan(degreesarctan * 180 / Math.PI / 180));
}
}
Anonymous user