Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 337 Bytes
import { Pipe, PipeTransform } from '@angular/core';
import { isNumberFinite } from '../utils/utils';
@Pipe({
name: 'degrees'
})
export class DegreesPipe implements PipeTransform{
transform (input: any): any {
if (!isNumberFinite(input)) {
return 'NaN';
}
return (input * 180) / Math.PI;
}
}
You can’t perform that action at this time.