Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

area-divide

Divide an area by the percentage.

Build Status Coverage Status

Usage

npm i --save area-divide

var areaDivide = require('area-divide');

var data = [0.4, 0.3, 0.3];
areaDivide(100, 50, data);

// will get array like below:
[{
  x1: 0,
  y1: 0,
  x2: 40,
  y2: 50,
}, {
  x1: 40,
   y1: 0,
  x2: 100,
  y2: 25,
}, {
  x1: 40,
  y1: 25,
  x2: 100,
  y2: 50,
}]

License

ISC@ProtoTeam.

About

Divide an area by the percentage.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages