Curriculum
Course: Java Basic
Login

Curriculum

Java Basic

Java Home

0/1

Java Introduction

0/1

Java Get Started

0/1

Java Syntax

0/1

Java Comments

0/1

Java Type Casting

0/1

Java Operators

0/1

Java Booleans

0/1

Java Switch

0/1

Java Break / Continue

0/1

Java Errors and Exception

0/1
Text lesson

atan()

Example

Provide the arctangent of various numerical values.

System.out.println(Math.atan(0.5));
System.out.println(Math.atan(-0.5));
System.out.println(Math.atan(5));
System.out.println(Math.atan(-5));
System.out.println(Math.atan(100));
System.out.println(Math.atan(-100));

Definition and Usage

The atan() function computes the arctangent of a number in radians.

Tip: The atan() function restricts angles to the range of -π/2 to π/2. For wider angle ranges, consider using the atan2() function.

Syntax

public static double atan(double number)

Parameter Values

Parameter

Description

number

The input needed is a number for which the arc tangent will be calculated.

Technical Details

Returns:

It yields a double value representing the arctangent of a given number, measured in radians.

Java Version:

Any