← All pipes
Numbers

roundHalf

Legacy two-decimal tie rounding.

Use it in your component

Standalone component
import { Component } from '@angular/core';
import { RoundHalfPipe } from 'extra-pipe';

@Component({
  standalone: true,
  imports: [RoundHalfPipe],
  template: `{{ 44.566 | roundHalf: 'up' }}`,
})
export class ExampleComponent {

}

Template
{{ 44.566 | roundHalf: 'up' }}

Try it live.

The output below runs the packed library. Edit data, not code.

Use double quotes for text, or a number, array, object or null.
Ordered parameters: param. Locale is controlled separately.
This pipe has no locale override.
Live template data
readonly value = 44.566;
readonly parameter0 = "up";
{{ value | roundHalf: parameter0 }}

Rendered output

44.57