Приаведение тангенса (tangent) к единому виду с другими сущностями, добавлено комплексное произведение двумерных векторов
This commit is contained in:
parent
896c8615f5
commit
fcbec62024
5 changed files with 182 additions and 114 deletions
|
@ -218,30 +218,6 @@ static inline void bg_fp64_versor_set_rotation(const BgFP64Rotation3* rotation,
|
|||
bg_fp64_versor_set_crude_turn(rotation->axis.x1, rotation->axis.x2, rotation->axis.x3, rotation->radians, BG_ANGLE_UNIT_RADIANS, result);
|
||||
}
|
||||
|
||||
// =============== Square modulus =============== //
|
||||
|
||||
static inline float bg_fp32_versor_get_square_modulus(const BgFP32Versor* versor)
|
||||
{
|
||||
return (versor->s0 * versor->s0 + versor->x1 * versor->x1) + (versor->x2 * versor->x2 + versor->x3 * versor->x3);
|
||||
}
|
||||
|
||||
static inline double bg_fp64_versor_get_square_modulus(const BgFP64Versor* versor)
|
||||
{
|
||||
return (versor->s0 * versor->s0 + versor->x1 * versor->x1) + (versor->x2 * versor->x2 + versor->x3 * versor->x3);
|
||||
}
|
||||
|
||||
// =================== Modulus ================== //
|
||||
|
||||
static inline float bg_fp32_versor_get_modulus(const BgFP32Versor* versor)
|
||||
{
|
||||
return sqrtf(bg_fp32_versor_get_square_modulus(versor));
|
||||
}
|
||||
|
||||
static inline double bg_fp64_versor_get_modulus(const BgFP64Versor* versor)
|
||||
{
|
||||
return sqrt(bg_fp64_versor_get_square_modulus(versor));
|
||||
}
|
||||
|
||||
// ================= Comparison ================= //
|
||||
|
||||
static inline int bg_fp32_versor_is_idle(const BgFP32Versor* versor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue