miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
helpers.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Include dependency graph for helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void swap (double *nbr1, double *nbr2)
 This function swaps numbers' position if the first parameter is bigger than the second parameter. More...
 
double ft_atof (const char *nptr)
 Convert a string to a double. More...
 

Function Documentation

◆ ft_atof()

double ft_atof ( const char *  nptr)

Convert a string to a double.

This function converts a string representation of a number to a double value.

Parameters
nptrThe string to be converted.
Returns
The converted double value.

◆ swap()

void swap ( double *  nbr1,
double *  nbr2 
)

This function swaps numbers' position if the first parameter is bigger than the second parameter.

ABOUT THE HEADER HELPERS.H

This header contains auxiliary functions for the program as a whole, i.e., functions that aren't subfunctions of a specific task in a given module.

Parameters
nbr1Receives the first number to be compared.
nbr2Receives the second the number to be compared.