import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'deg2rad' } ) export class Deg2RadPipe implements PipeTransform { param degree transform ( degrees ) { return ( degrees / 180 ) * Math . PI ; } }