BrushCue Example: Cosine (Degrees)¶

Open In Colab

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

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

angle_degrees = 60.0
graph = bc.Float.cos(
    bc.Float.divide(bc.Float.multiply(angle_degrees, bc.Float.pi()), 180.0)
)

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