meta data for this page
This is an old revision of the document!
Rectangle
A two dimensional shape made with four straight sides where all interior angles are right angles (90°).
Learn about rectangles at MathIsFun.com
The size
specifies the size across X and Y axis. Rectangles can be created at a requested center
..
Defaults:
- size : [2, 2]
- center : [0, 0]
const myshape = rectangle({size: [3, 4]) const myshape = rectangle({size: [3, 4], center: [5, 5])
Square
The specialized square primitive also exists, but requires only one number value for all sides.
const myshape = square({size: 3) const myshape = square({size: 3, center: [5, 5])