MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / math

Method math

ij/src/main/java/ij/macro/Functions.java:521–538  ·  view source on GitHub ↗
(int type)

Source from the content-addressed store, hash-verified

519 }
520
521 final double math(int type) {
522 double arg = getArg();
523 switch (type) {
524 case ABS: return Math.abs(arg);
525 case COS: return Math.cos(arg);
526 case EXP: return Math.exp(arg);
527 case FLOOR: return Math.floor(arg);
528 case LOG: return Math.log(arg);
529 case ROUND: return Math.floor(arg + 0.5);
530 case SIN: return Math.sin(arg);
531 case SQRT: return Math.sqrt(arg);
532 case TAN: return Math.tan(arg);
533 case ATAN: return Math.atan(arg);
534 case ASIN: return Math.asin(arg);
535 case ACOS: return Math.acos(arg);
536 default: return 0.0;
537 }
538 }
539
540 final double math2(int type) {
541 double a1 = getFirstArg();

Callers 1

getFunctionValueMethod · 0.95

Calls 5

getArgMethod · 0.95
absMethod · 0.45
expMethod · 0.45
logMethod · 0.45
sqrtMethod · 0.45

Tested by

no test coverage detected