Penning Trap Simulation
Simulate particle behavior inside a Penning Trap
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
15
#ifndef __UTILS__
16
#define __UTILS__
17
18
#include <string>
19
#include <vector>
20
#include <iomanip>
21
#include <sstream>
22
31
#ifdef DBG
32
#define DEBUG(msg) std::cout << __FILE__ << " "
<< __LINE__ << ": " \
33
<< msg << std::endl
34
#else
35
#define DEBUG(msg)
36
#endif
37
51
std::string
scientific_format
(
double
d,
int
width=20,
int
prec=10);
52
61
std::string
scientific_format
(
const
std::vector<double>& v,
62
int
width=20,
63
int
prec=10);
64
65
#endif
scientific_format
std::string scientific_format(double d, int width=20, int prec=10)
Turns a double into a string written in scientific format.
Definition:
utils.cpp:14
include
utils.hpp
Generated by
1.9.6