feat(math): adding the header for math library
This commit is contained in:
parent
b5f2f370bf
commit
574c470a1c
1 changed files with 53 additions and 0 deletions
53
includes/math.h
Normal file
53
includes/math.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* math.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/17 16:14:25 by rparodi #+# #+# */
|
||||
/* Updated: 2025/09/17 16:44:55 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MATH_H
|
||||
# define MATH_H
|
||||
|
||||
# include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief Perform a power calculation
|
||||
*
|
||||
* @param base The element to calculate the power
|
||||
* @param exponent The power to calculate
|
||||
* @return The result of the operation
|
||||
*/
|
||||
uint64_t ft_power(uint64_t base, uint64_t exponent);
|
||||
|
||||
/**
|
||||
* @brief Select the maximum of the two parameters
|
||||
*
|
||||
* @param x First element
|
||||
* @param y Second element
|
||||
* @return The maximum of the two parameters
|
||||
*/
|
||||
uint32_t ft_min(uint32_t x, uint32_t y);
|
||||
|
||||
/**
|
||||
* @brief Select the minimum of the two parameters
|
||||
*
|
||||
* @param x First element
|
||||
* @param y Second element
|
||||
* @return The minimum of the two parameters
|
||||
*/
|
||||
uint32_t ft_min(uint32_t x, uint32_t y);
|
||||
|
||||
/**
|
||||
* @brief Perform a Root sqare calculation
|
||||
*
|
||||
* @param number The element to calculate
|
||||
* @return The square root of the parameters
|
||||
*/
|
||||
uint64_t ft_sqrt(uint64_t number);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue