BrushCue Example: Triangle Area¶

Open In Colab

You can use this tool online at https://www.brushcue.com/tools/triangle-area

In [ ]:
!pip install brushcue
In [1]:
import brushcue as bc

base = 4.0
height = 3.0
graph = bc.Float.divide(bc.Float.multiply(base, height), 2.0)

ctx = bc.Context()
print(graph.execute(ctx))
6.0
[wgpu] using backend Metal — adapter 'Apple M5' (IntegratedGpu), driver ''