Завершение большого переименования

This commit is contained in:
Andrey Pokidov 2025-01-15 15:08:12 +07:00
parent 120e651517
commit 3805354611
31 changed files with 1213 additions and 1255 deletions

View file

@ -1,3 +1,3 @@
#include "basis.h"
#include "utilities.h"
#include "angle.h"

View file

Internal server error - Personal Git Server: Beyond coding. We Forge.

500

Internal server error

Forgejo version: 11.0.1+gitea-1.22.0

@ -1,102 +1,102 @@
#ifndef _BASIC_GEOMETRY_ANGLE_H_
#define _BASIC_GEOMETRY_ANGLE_H_
#ifndef _BGC_ANGLE_H_
#define _BGC_ANGLE_H_
#include <math.h>
#include "basis.h"
#include "utilities.h"
#define FP32_PI 3.1415926536f
#define FP32_TWO_PI 6.2831853072f
#define FP32_HALF_OF_PI 1.5707963268f
#define FP32_THIRD_OF_PI 1.0471975512f
#define FP32_FOURTH_OF_PI 0.7853981634f
#define FP32_SIXTH_OF_PI 0.5235987756f
#define BGC_PI_FP32 3.1415926536f
#define BGC_TWO_PI_FP32 6.2831853072f
#define BGC_HALF_OF_PI_FP32 1.5707963268f
#define BGC_THIRD_OF_PI_FP32 1.0471975512f
#define BGC_FOURTH_OF_PI_FP32 0.7853981634f
#define BGC_SIXTH_OF_PI_FP32 0.5235987756f
#define FP32_DEGREES_IN_RADIAN 57.295779513f
#define FP32_TURNS_IN_RADIAN 0.1591549431f
#define FP32_RADIANS_IN_DEGREE 1.745329252E-2f
#define FP32_TURNS_IN_DEGREE 2.7777777778E-3f
#define BGC_DEGREES_IN_RADIAN_FP32 57.295779513f
#define BGC_TURNS_IN_RADIAN_FP32 0.1591549431f
#define BGC_RADIANS_IN_DEGREE_FP32 1.745329252E-2f
#define BGC_TURNS_IN_DEGREE_FP32 2.7777777778E-3f
#define FP64_PI 3.14159265358979324
#define FP64_TWO_PI 6.28318530717958648
#define FP64_HALF_OF_PI 1.57079632679489662
#define FP64_THIRD_OF_PI 1.04719755119659775
#define FP64_FOURTH_OF_PI 0.78539816339744831
#define FP64_SIXTH_OF_PI 0.523598775598298873
#define BGC_PI_FP64 3.14159265358979324
#define BGC_TWO_PI_FP64 6.28318530717958648
#define BGC_HALF_OF_PI_FP64 1.57079632679489662
#define BGC_THIRD_OF_PI_FP64 1.04719755119659775
#define BGC_FOURTH_OF_PI_FP64 0.78539816339744831
#define BGC_SIXTH_OF_PI_FP64 0.523598775598298873
#define FP64_DEGREES_IN_RADIAN 57.2957795130823209
#define FP64_TURNS_IN_RADIAN 0.159154943091895336
#define FP64_RADIANS_IN_DEGREE 1.74532925199432958E-2
#define FP64_TURNS_IN_DEGREE 2.77777777777777778E-3
#define BGC_DEGREES_IN_RADIAN_FP64 57.2957795130823209
#define BGC_TURNS_IN_RADIAN_FP64 0.159154943091895336
#define BGC_RADIANS_IN_DEGREE_FP64 1.74532925199432958E-2
#define BGC_TURNS_IN_DEGREE_FP64 2.77777777777777778E-3
typedef enum {
BG_ANGLE_UNIT_RADIANS = 1,
BG_ANGLE_UNIT_DEGREES = 2,
BG_ANGLE_UNIT_TURNS = 3
} angle_unit_t;
BGC_ANGLE_UNIT_RADIANS = 1,
BGC_ANGLE_UNIT_DEGREES = 2,
BGC_ANGLE_UNIT_TURNS = 3
} bgc_angle_unit_t;
typedef enum {
/**
* The measure of an angle with a range of:
* [0, 360) degrees, [0, 2xPI) radians, [0, 1) turns, [0, 400) gradians
*/
BG_ANGLE_RANGE_UNSIGNED = 1,
BGC_ANGLE_RANGE_UNSIGNED = 1,
/**
* The measure of an angle with a range of:
* (-180, 180] degrees, (-PI, PI] radians, (-0.5, 0.5] turns, (-200, 200] gradians
*/
BG_ANGLE_RANGE_SIGNED = 2
} angle_range_t;
BGC_ANGLE_RANGE_SIGNED = 2
} bgc_angle_range_t;
// !================= Radians ==================! //
// ========= Convert radians to degrees ========= //
inline float fp32_radians_to_degrees(const float radians)
inline float bgc_radians_to_degrees_fp32(const float radians)
{
return radians * FP32_DEGREES_IN_RADIAN;
return radians * BGC_DEGREES_IN_RADIAN_FP32;
}
inline double fp64_radians_to_degrees(const double radians)