version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Basic mathematical functions and defines
|
||||
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
|
||||
Copyright (C) 2015 Ivan Pelipenko peri4ko@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -32,6 +32,11 @@
|
||||
# undef PIP_MATH_Y0
|
||||
# undef PIP_MATH_Y1
|
||||
# undef PIP_MATH_YN
|
||||
# include <complex.h>
|
||||
# include <math.h>
|
||||
#else
|
||||
# include <complex>
|
||||
# include <cmath>
|
||||
#endif
|
||||
|
||||
#ifndef M_LN2
|
||||
@@ -77,6 +82,25 @@
|
||||
# define M_LIGHT_SPEED 2.99792458e+8
|
||||
#endif
|
||||
|
||||
using std::complex;
|
||||
|
||||
typedef complex<int> complexi;
|
||||
typedef complex<float> complexf;
|
||||
typedef complex<double> complexd;
|
||||
typedef complex<ldouble> complexld;
|
||||
|
||||
const complexld complexld_i(0., 1.);
|
||||
const complexld complexld_0(0.);
|
||||
const complexld complexld_1(1.);
|
||||
const complexd complexd_i(0., 1.);
|
||||
const complexd complexd_0(0.);
|
||||
const complexd complexd_1(1.);
|
||||
|
||||
__PICONTAINERS_SIMPLE_TYPE__(complexi)
|
||||
__PICONTAINERS_SIMPLE_TYPE__(complexf)
|
||||
__PICONTAINERS_SIMPLE_TYPE__(complexd)
|
||||
__PICONTAINERS_SIMPLE_TYPE__(complexld)
|
||||
|
||||
const double deg2rad = M_PI_180;
|
||||
const double rad2deg = M_180_PI;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user