Published
Edited
Dec 23, 2019
Importers
1 star
Also listed in…
Math
Insert cell
Insert cell
Insert cell
constants = `
#ifndef PI
#define PI 3.141592653589793238
#endif

#ifndef TO_RADIANS
#define TO_RADIANS 0.01745329251
#endif

#ifndef HALF_PI
#define HALF_PI 1.57079633
#endif

#ifndef HALF_PI_INV
#define HALF_PI_INV 0.15915494309
#endif

#ifndef PI_INV
#define PI_INV 0.31830988618
#endif

#ifndef TWO_PI
#define TWO_PI 6.28318530718
#endif
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
csub = `vec2 csub (vec2 a, vec2 b) {
return a - b;
}`
Insert cell
cadd = `vec2 cadd (vec2 a, vec2 b) {
return a + b;
}`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more