cg-size

0.1.0 • Public • Published

A structure that contains width and height values.

Usage

var CGSize = require('cg-size');
 
// Create an area with width and height
var size = new CGSize(33.3, 50);
 
console.log( size.width, size.height ); // 30.3, 50


getHeightMidpoint()

Calculates the middle point for the height.
Returns: CGPoint
getAreaMidpoint()
Calculates the middle point for both width and height.
Returns: CGPoint
isLargerThanSize( size: CGSize )
Calculates its total area and compares it to another size object’s area.
Returns: Boolean

Package Sidebar

Install

npm i cg-size

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • josebarrios