Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
namespace PhpOffice\PhpSpreadsheet\Shared;
4
 
5
class IntOrFloat
6
{
7
    /**
8
     * Help some functions with large results operate correctly on 32-bit,
9
     * by returning result as int when possible, float otherwise.
10
     */
11
    public static function evaluate(float|int $value): float|int
12
    {
13
        $iValue = (int) $value;
14
 
15
        return ($value == $iValue) ? $iValue : $value;
16
    }
17
}