mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 05:36:10 +00:00
refactor: OOP code movements started :)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Project: TravianZ ##
|
||||
## Filename User.php ##
|
||||
## Developed by: martinambrus ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2017. All rights reserved. ##
|
||||
## URLs: https://travian.martinambrus.com ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
namespace App\Utils;
|
||||
|
||||
/**
|
||||
*
|
||||
* Mathematics-related helpers.
|
||||
*
|
||||
* @author martinambrus
|
||||
*
|
||||
*/
|
||||
class Math {
|
||||
|
||||
public static function isInt($val) {
|
||||
return (is_numeric($val) && intval($val) === $val);
|
||||
}
|
||||
|
||||
public static function isFloat($val) {
|
||||
return (is_numeric($val) && floatval($val) === $val);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user