Bounding box calculation optimalization



Signed-off-by: bvanr <henkibrij@hotmail.com>