Cosine

From SwiftAPI

(Redirected from Perl cos)
Jump to: navigation, search

Contents

C#

MSDN

double x = 0;
double r = Math.Cos(x);
// r == 1.0

Java

double x = 0;
double r = Math.cos(x);
// r == 1

JavaScript

var x = 0;
var r = Math.cos(x);
// r == 1

Perl

perldoc

$x = 0;
$r = cos($x);
# $r == 1

PHP

php.net

$x = 0;
$r = cos($x);
// $r == 1

Python

import math
x = 0
r = math.cos(x)
# r == 1.0

Ruby

Ruby-Docs.org

x = 0
r = Math.cos(x)
# r == 1.0
Personal tools