PHP Classes

File: public/Classes/Operationen/Wurzel.php

Recommend this page to a friend!
  Classes of stefan   PHP Calculator   public/Classes/Operationen/Wurzel.php   Download  
File: public/Classes/Operationen/Wurzel.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Calculator
Calculate the result of multiple math operations
Author: By
Last change:
Date: 3 years ago
Size: 308 bytes
 

Contents

Class file image Download
<?php
   
namespace Taschenrechner\Classes\Operationen;
   
    class
Wurzel extends Operation {
       
//Gibt das Zeichen für die Operation zurück
       
public function getSign() {
            return
"?";
        }
       
        public function
calculate($a, $b=NULL) {
            if(
$a==NULL) {
               
$a=2;
            }
            return
pow($b,1/$a);
        }
    }
?>