Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/cmd/map/libmap/ccubrt.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include "map.h"
4
 
5
void
6
ccubrt(double zr, double zi, double *wr, double *wi)
7
{
8
	double r, theta;
9
	theta = atan2(zi,zr);
10
	r = cubrt(hypot(zr,zi));
11
	*wr = r*cos(theta/3);
12
	*wi = r*sin(theta/3);
13
}