removed unused and wrong ft_modf

This commit is contained in:
hugogogo
2026-05-12 00:35:11 +02:00
parent de28530259
commit f662d7f750
3 changed files with 0 additions and 27 deletions

View File

@@ -1,25 +0,0 @@
#include "libft.h"
#include <stdio.h> // tmp for printf, for float debug
/**
* Splits a double into its integer and fractional parts,
* it returns the fractional part,
* and stores the integer part in the in_part param (if not null)
* e.g.:
* -3.7 → -3.0 and -0.7 (returns -0.7)
*/
double ft_modf(double x, double *store_int_part)
{
// extract the integer part by casting to long long
long long integer = (long long)x;
if (store_int_part != NULL)
{
*store_int_part = (double)integer;
}
// compute the fractional part
double frac_part = x - integer;
return frac_part;
}