102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
functions.h
Go to the documentation of this file.
1/* Recovered declarations; ABI and original layout preserved. */
2#ifndef PCDOGS_MATH_FUNCTIONS_H
3#define PCDOGS_MATH_FUNCTIONS_H
5#include "pcdogs/math/types.h"
7
8int32_t Math_EaseInOutQuadraticQ12(int32_t input_q12);
9
10struct Math_Vec3F *Math_CalculateFaceNormal(struct Math_Vec3F *out_normal, struct Math_Vec3F const *point0, struct Math_Vec3F const *point1, struct Math_Vec3F const *point2);
11
12int32_t Math_ApproxDistance3DWeighted(int32_t dx, int32_t dy, int32_t dz);
13
14int32_t Math_SqrtFP12(uint32_t value);
15
16int32_t Math_SqrtFP14(uint32_t value);
17
18int32_t Math_CalculateTriangleHeight(int32_t local_xq6, int32_t local_zq6, struct Collision_Vertex const *tri_a, struct Collision_Vertex const *tri_b, struct Collision_Vertex const *tri_c);
19
20void Math_MulMat3x3Q12(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *right_factor, struct Math_Matrix3x3I16 const *left_factor);
21
22void Math_BuildMatrixRotationX(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle);
23
24void Math_BuildMatrixRotationY(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle);
25
26void Math_BuildMatrixRotationZ(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle);
27
28void Math_BuildMatrixRotationXY(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y);
29
30void Math_BuildRotationMatrix(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y, int32_t angle_z);
31
32void Math_BuildRotationMatrixFromXYSinCos(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int16_t sin_x_q12, int16_t cos_x_q12, int16_t sin_y_q12, int16_t cos_y_q12, int32_t angle_z);
33
34uint16_t Math_ClampAngleDelta(int16_t target_angle, int16_t current_angle, int16_t max_delta);
35
36uint32_t Math_GenerateRandom(uint32_t range);
37
38uint32_t Math_SetRandomSeed(uint32_t seed);
39
40int32_t Math_SinQ14(int32_t angle);
41
42int32_t Math_CalculateAtan2Fast(int32_t y, int32_t x);
43
44int16_t Math_CalculateAtan2FP12(int32_t y, int32_t x);
45
46int32_t Math_AsinRatioFP12(int32_t numerator, int32_t denominator);
47
48int32_t Math_AcosRatioFP12(int32_t numerator, int32_t denominator);
49
50void Math_BuildQuaternionFromMatrix(struct Math_Matrix3x3I16 *matrix, struct Math_QuaternionI16 *output_quat);
51
52void Math_BuildRotationFromVectors(struct Math_Vec3I16 *from_vec, struct Math_Vec3I16 *to_vec, struct Math_Matrix3x3I16 *out_matrix);
53
54int32_t Math_EaseInOut(int32_t t_q12, int32_t ease_in_q12, int32_t ease_out_q12);
55
56#endif /* PCDOGS_MATH_FUNCTIONS_H */
void Math_BuildMatrixRotationY(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
Definition matrices.c:76
int32_t Math_SinQ14(int32_t angle)
int32_t Math_SqrtFP14(uint32_t value)
void Math_BuildRotationFromVectors(struct Math_Vec3I16 *from_vec, struct Math_Vec3I16 *to_vec, struct Math_Matrix3x3I16 *out_matrix)
Definition matrices.c:366
int32_t Math_CalculateTriangleHeight(int32_t local_xq6, int32_t local_zq6, struct Collision_Vertex const *tri_a, struct Collision_Vertex const *tri_b, struct Collision_Vertex const *tri_c)
int32_t Math_SqrtFP12(uint32_t value)
int32_t Math_EaseInOut(int32_t t_q12, int32_t ease_in_q12, int32_t ease_out_q12)
uint16_t Math_ClampAngleDelta(int16_t target_angle, int16_t current_angle, int16_t max_delta)
void Math_BuildQuaternionFromMatrix(struct Math_Matrix3x3I16 *matrix, struct Math_QuaternionI16 *output_quat)
Definition matrices.c:250
int32_t Math_AcosRatioFP12(int32_t numerator, int32_t denominator)
void Math_BuildMatrixRotationX(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
Definition matrices.c:54
void Math_BuildRotationMatrixFromXYSinCos(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int16_t sin_x_q12, int16_t cos_x_q12, int16_t sin_y_q12, int16_t cos_y_q12, int32_t angle_z)
Definition matrices.c:204
void Math_BuildMatrixRotationZ(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
Definition matrices.c:98
void Math_MulMat3x3Q12(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *right_factor, struct Math_Matrix3x3I16 const *left_factor)
Definition matrices.c:11
uint32_t Math_SetRandomSeed(uint32_t seed)
struct Math_Vec3F * Math_CalculateFaceNormal(struct Math_Vec3F *out_normal, struct Math_Vec3F const *point0, struct Math_Vec3F const *point1, struct Math_Vec3F const *point2)
Definition fixed_point.c:35
int32_t Math_ApproxDistance3DWeighted(int32_t dx, int32_t dy, int32_t dz)
Definition fixed_point.c:59
int32_t Math_EaseInOutQuadraticQ12(int32_t input_q12)
Definition fixed_point.c:24
int16_t Math_CalculateAtan2FP12(int32_t y, int32_t x)
uint32_t Math_GenerateRandom(uint32_t range)
void Math_BuildMatrixRotationXY(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y)
Definition matrices.c:120
int32_t Math_AsinRatioFP12(int32_t numerator, int32_t denominator)
void Math_BuildRotationMatrix(struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y, int32_t angle_z)
Definition matrices.c:154
int32_t Math_CalculateAtan2Fast(int32_t y, int32_t x)
float y
Definition types.h:447
float x
Definition types.h:446