PHP Classes

File: src/Functions/float.php

Recommend this page to a friend!
  Classes of Axel Pardemann   PHP Scalar Objects   src/Functions/float.php   Download  
File: src/Functions/float.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Scalar Objects
Implement objects that behave like scalar values
Author: By
Last change:
Date: 5 years ago
Size: 387 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
NorseBlue\ScalarObjects\Functions;

use
NorseBlue\ScalarObjects\Types\FloatType;
use
NorseBlue\ScalarObjects\Types\NumberType;

/**
 * Create a new FloatType object.
 *
 * @param int|float|NumberType $value
 *
 * @return \NorseBlue\ScalarObjects\Types\FloatType
 */
function float($value = 0.0): FloatType
{
    return new
FloatType($value);
}