Skip to content
Snippets Groups Projects
math-atan.pipe.ts 244 B
Newer Older
  • Learn to ignore specific revisions
  • import { Pipe, PipeTransform } from '@angular/core';
    
    @Pipe({
      name: 'mathAtan'
    })
    export class MathAtanPipe implements PipeTransform {
      transform(adjacent: number, opposite: number): number {
        return Math.atan(opposite / adjacent);
      }
    }