| lib/Spreadsheet/Engine/Function/ATAN2.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 12 | 12 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | 1 | 3 | 33.3 |
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 19 | 22 | 86.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Spreadsheet::Engine::Function::ATAN2; | ||||||
| 2 | |||||||
| 3 | 28 | 28 | 153 | use strict; | |||
| 28 | 94 | ||||||
| 28 | 978 | ||||||
| 4 | 28 | 28 | 560 | use warnings; | |||
| 28 | 58 | ||||||
| 28 | 728 | ||||||
| 5 | |||||||
| 6 | 28 | 28 | 154 | use base 'Spreadsheet::Engine::Fn::math2'; | |||
| 28 | 63 | ||||||
| 28 | 5680 | ||||||
| 7 | |||||||
| 8 | sub calculate { | ||||||
| 9 | 546 | 546 | 1 | 18493 | my ($self, $x, $y) = @_; | ||
| 10 | 546 | 50 | 33 | 2304 | die Spreadsheet::Engine::Error->div0 if $x == 0 && $y == 0; | ||
| 11 | 546 | 21384 | return atan2($y, $x); | ||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | 1; | ||||||
| 15 | |||||||
| 16 | __END__ |