92 lines
3.6 KiB
C
92 lines
3.6 KiB
C
/*
|
|
* Sweet is a small library for basic math and small matrix operations.
|
|
* Copyright 2014 Luc Girod.
|
|
*
|
|
* This library is free software: you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation, either
|
|
* version 3 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef SWEET_MATH_SHORT_H
|
|
#define SWEET_MATH_SHORT_H
|
|
|
|
#include "sweet_math.h"
|
|
|
|
#define radian_2_degree(radian) radian * 57.2957795130823208767981548
|
|
#define degree_2_radian(degree) degree * 0.01745329251994329576923690768488
|
|
|
|
#define EPSILON SWEET_EPSILON
|
|
#define is_equals(a, b, epsilon) sweet_math_approx_equals(a, b, epsilon)
|
|
#define is_zero(a, epsilon) sweet_math_approx_zero(a, epsilon)
|
|
|
|
#define invsqrt sweet_math_invsqrt
|
|
#define nearest sweet_math_nearest
|
|
#define quadratic_polynomial sweet_math_quadratic_polynomial
|
|
#define cubic_polynomial sweet_math_cubic_polynomial
|
|
#define vec2_new sweet_vector_new2
|
|
#define vec3_new sweet_vector_new3
|
|
#define vec4_new sweet_vector_new4
|
|
#define vec2_norm sweet_vector_norm2
|
|
#define vec3_norm sweet_vector_norm3
|
|
#define vec4_norm sweet_vector_norm4
|
|
#define vec2h_norm sweet_vector_norm2h
|
|
#define vec3h_norm sweet_vector_norm3h
|
|
#define vec2_square_norm sweet_vector_square_norm2
|
|
#define vec3_square_norm sweet_vector_square_norm3
|
|
#define vec4_square_norm sweet_vector_square_norm4
|
|
#define vec2h_square_norm sweet_vector_square_norm2h
|
|
#define vec3h_square_norm sweet_vector_square_norm3h
|
|
#define vec2_dist sweet_vector_dist2
|
|
#define vec3_dist sweet_vector_dist3
|
|
#define vec4_dist sweet_vector_dist4
|
|
#define vec2_dist2 sweet_vector_square_dist2
|
|
#define vec3_dist2 sweet_vector_square_dist3
|
|
#define vec4_dist2 sweet_vector_square_dist4
|
|
#define vec2_dot sweet_vector_dot2
|
|
#define vec3_dot sweet_vector_dot3
|
|
#define vec4_dot sweet_vector_dot4
|
|
#define vec2h_dot sweet_vector_dot2h
|
|
#define vec3h_dot sweet_vector_dot3h
|
|
#define cross sweet_vector_cross
|
|
#define crossh sweet_vector_crossh
|
|
#define vec3_triple_product sweet_vector_triple_product
|
|
#define vec3h_triple_product sweet_vector_triple_producth
|
|
#define vec2_normalize sweet_vector_normalize2
|
|
#define vec3_normalize sweet_vector_normalize3
|
|
#define vec4_normalize sweet_vector_normalize4
|
|
#define vec2_scale sweet_vector_scale2
|
|
#define vec3_scale sweet_vector_scale3
|
|
#define vec4_scale sweet_vector_scale4
|
|
#define vec2_rescale sweet_vector_rescale2
|
|
#define vec3_rescale sweet_vector_rescale3
|
|
#define vec4_rescale sweet_vector_rescale4
|
|
#define vec2_add sweet_vector_add2
|
|
#define vec3_add sweet_vector_add3
|
|
#define vec4_add sweet_vector_add4
|
|
#define vec2_sub sweet_vector_sub2
|
|
#define vec3_sub sweet_vector_sub3
|
|
#define vec4_sub sweet_vector_sub4
|
|
#define vec2_angle sweet_vector_angle2
|
|
#define vec3_angle sweet_vector_angle3
|
|
#define vec2_product sweet_vector_product2
|
|
#define vec3_product sweet_vector_product3
|
|
#define vec4_product sweet_vector_product4
|
|
#define quat_new sweet_quaternion_new
|
|
#define quat_rot sweet_quaternion_rotation
|
|
#define quat_conjugate sweet_quaternion_conjugate
|
|
#define quat_add sweet_quaternion_add
|
|
#define quat_product sweet_quaternion_product
|
|
#define sweet_quaternion_norm quat_norm
|
|
|
|
#endif
|
|
|