mirror of
https://github.com/CyanoFresh/SmartHomePHP.git
synced 2026-02-27 06:41:21 +01:00
25 lines
369 B
PHP
25 lines
369 B
PHP
<?php
|
|
|
|
namespace app\helpers;
|
|
|
|
class RGBHelper
|
|
{
|
|
/**
|
|
* @param integer $value
|
|
* @return integer
|
|
*/
|
|
public static function from8to10($value)
|
|
{
|
|
return $value * 4;
|
|
}
|
|
|
|
/**
|
|
* @param integer $value
|
|
* @return float|integer
|
|
*/
|
|
public static function from10to8($value)
|
|
{
|
|
return floor($value / 4);
|
|
}
|
|
}
|