File: polar_coordinates.h

package info (click to toggle)
python-pyglm 2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,008 kB
  • sloc: cpp: 53,029; python: 3,683; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include "../function_generator_macros.h"

PyGLM_MAKE_GLM_FUNC_V3__tfF(polar)
PyGLM_MAKE_GLM_FUNC_V2__tfF(euclidean)

PyDoc_STRVAR(euclidean_docstr,
	"euclidean(polar: vec2) -> vec3\n"
	"	Convert Polar to Euclidean coordinates."
);
PyDoc_STRVAR(polar_docstr,
	"polar(euclidean: vec3) -> vec3\n"
	"	Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude."
);

#define POLAR_COORDINATES_METHODS \
{ "polar", (PyCFunction)polar_, METH_O, polar_docstr }, \
{ "euclidean", (PyCFunction)euclidean_, METH_O, euclidean_docstr }