mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-29 09:04:26 +00:00
f5c3e029b5
This is a very naive and primitive logger of user requests to the game. To be used on systems where access to webserver's log data is not available (especially if the webserver doesn't store POST data as well).
34 lines
1.3 KiB
PHP
34 lines
1.3 KiB
PHP
<?php
|
|
#################################################################################
|
|
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
|
## --------------------------------------------------------------------------- ##
|
|
## Project: TravianZ ##
|
|
## Filename Math.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);
|
|
}
|
|
|
|
} |