Initial LinuxCNC WebAssembly workspace snapshot
This commit is contained in:
32
wasm-core/include/sim_posemath.h
Normal file
32
wasm-core/include/sim_posemath.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef LINUXCNC_WEB_WASM_SIM_POSEMATH_H
|
||||
#define LINUXCNC_WEB_WASM_SIM_POSEMATH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum sim_posemath_result {
|
||||
SIM_POSEMATH_OK = 0,
|
||||
SIM_POSEMATH_ERR_ARGUMENT = -400,
|
||||
SIM_POSEMATH_ERR_NONFINITE = -401,
|
||||
SIM_POSEMATH_ERR_DEGENERATE = -402,
|
||||
SIM_POSEMATH_ERR_RANGE = -403,
|
||||
};
|
||||
|
||||
typedef struct sim_posemath_cartesian {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
} sim_posemath_cartesian;
|
||||
|
||||
int sim_posemath_normalize(const sim_posemath_cartesian *input, sim_posemath_cartesian *output);
|
||||
int sim_posemath_dot(const sim_posemath_cartesian *left, const sim_posemath_cartesian *right, double *output);
|
||||
int sim_posemath_line_point(const sim_posemath_cartesian *start, const sim_posemath_cartesian *end,
|
||||
double fraction, sim_posemath_cartesian *output);
|
||||
int sim_posemath_is_finite(const sim_posemath_cartesian *value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user