Guest User

Untitled

a guest
Dec 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. private function getSizeByFixedWidth($newWidth)
  2. {
  3. $ratio = $this->height / $this->width;
  4. $DifHeight = $this->height - $newHeight ;
  5. $DifWidth = $this->width - $newWidth ;
  6. $bigger=max(abs($DifHeight),abs($DifWidth) )
  7. if $bigger=abs($DifHeight);
  8. $NewHeight = $this->height - $DifHeight
  9. $ChangeHeight = $NewHeight/$this->height;
  10. $NewHeight = $this->height * $Change;
  11.  
  12.  
  13. return $NewHeight;
  14. }
Add Comment
Please, Sign In to add comment