MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / interval_example

Function interval_example

website/examples/Interval.cpp:4–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <cassert>
3
4void
5interval_example ()
6{
7 Imath::Intervalf v;
8
9 assert (v.isEmpty ());
10 assert (!v.hasVolume ());
11 assert (!v.isInfinite ());
12
13 v.extendBy (1.0f);
14 assert (!v.isEmpty ());
15
16 v.extendBy (2.0f);
17 assert (v.hasVolume ());
18 assert (v.intersects (1.5f));
19}

Callers 1

mainFunction · 0.85

Calls 1

extendByMethod · 0.80

Tested by

no test coverage detected