Bug 1535273 - Remove webrender::util::rect_from_points. r=kats

This commit is contained in:
Nicolas Silva 2019-04-12 16:08:39 +02:00
Родитель 5568e27ddb
Коммит c341b17328
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -4,7 +4,7 @@
use api::BorderRadius;
use api::units::*;
use euclid::{Point2D, Rect, Size2D, TypedPoint2D, TypedRect, TypedSize2D, Vector2D};
use euclid::{TypedPoint2D, TypedRect, TypedSize2D, Vector2D};
use euclid::{TypedTransform2D, TypedTransform3D, TypedVector2D, TypedScale};
use malloc_size_of::{MallocShallowSizeOf, MallocSizeOf, MallocSizeOfOps};
use plane_split::{Clipper, Polygon};
@ -415,12 +415,6 @@ impl<U> RectHelpers<U> for TypedRect<f32, U> {
}
}
#[allow(dead_code)]
#[inline]
pub fn rect_from_points_f(x0: f32, y0: f32, x1: f32, y1: f32) -> Rect<f32> {
Rect::new(Point2D::new(x0, y0), Size2D::new(x1 - x0, y1 - y0))
}
pub fn lerp(a: f32, b: f32, t: f32) -> f32 {
(b - a) * t + a
}