otm / svg.math.js Goto Github PK
View Code? Open in Web Editor NEWA math extension for the svg.js library
A math extension for the svg.js library
Typo in draw method of Line
https://github.com/otm/svg.math.js/blob/master/svg.math.js#L127
Hi,
I am doing some research on rectangles, and would like to create a Rectangle type. Would you like to add this type to svg.math.js? It will probably have methods such as: containsPoint, intersectsRect, etc.
Could you please add a LICENSE file to the repository so it is more clear how your code is licensed? Thanks!
In the move function, the sign for applying dy is the same as the sign for dx. A sign for dy should be calculated as well
Line 85
var radius = attr.radus || 5;
This seems like a typo.
Additionally, it is not clear what "attr" is. The argument is called "options".
If you use line.move() and the source and destination points are in a vertical line (i.e. both have the same x co-ordinate) then it moves in the wrong direction.
Example:
alert( new SVG.math.Line( new SVG.math.Point( 100, 100 ),
new SVG.math.Point( 100, 200 ) ).move(
new SVG.math.Point( 100, 100 ),
new SVG.math.Point( 100, 200 ), 10 ) .y );
Returns 90 (i.e. moving up) but should return 110 (moving down, along the line).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.