🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
mpl_utils.h
1
// 从 matplotlib mplutils.h 提取的工具函数 (去除 Python 依赖)
2
#pragma once
3
#include <cmath>
4
#include <cstddef>
5
6
inline
int
mpl_round_to_int(
double
v) {
7
return
(
int
)(v + ((v >= 0.0) ? 0.5 : -0.5));
8
}
9
10
inline
double
mpl_round(
double
v) {
11
return
(
double
)mpl_round_to_int(v);
12
}
13
14
// Path 命令代码 (与 Agg 兼容)
15
enum
{
16
AG_PATH_STOP = 0,
17
AG_PATH_MOVETO = 1,
18
AG_PATH_LINETO = 2,
19
AG_PATH_CURVE3 = 3,
20
AG_PATH_CURVE4 = 4,
21
AG_PATH_CLOSEPOLY = 0x4f
22
};
src
AstPlot
Agg
mpl_utils.h
制作者
1.12.0