libft
Functions
ft_power.c File Reference
#include "libft.h"
#include <limits.h>
+ Include dependency graph for ft_power.c:

Go to the source code of this file.

Functions

int ft_power (int num, unsigned int exponent)
 Raises a number to a given power. More...
 

Function Documentation

◆ ft_power()

int ft_power ( int  num,
unsigned int  exponent 
)

Raises a number to a given power.

Parameters
numThe base.
exponentThe exponent.
Returns
The result or 0 if integer overflow occurred.

Definition at line 24 of file ft_power.c.