Code Monkey home page Code Monkey logo

linal's People

Contributors

citrux avatar freecx avatar gitter-badger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

gitter-badger

linal's Issues

Changelog

Add changelog to readme or in special file (markdown?)

Generic Types

Rewrite code to generic types.

To write code with generic types we need use Zero trait, but it unstable for now.

Inconsistent documentation

Just checklist for tracking:

  • remove anything about Point
  • write description for modules:
    • vec2
    • vec3
    • lib

Cross product trait

I add Cross trait for same syntax in two different cases:

let a = Vec2::new(...);
let b = Vec2::new(...);
let c = 1f64; // orthogonal to plane vector with length 1
a.cross(b); // return f64
a.cross(c); // return Vec2

But explicit import of trait is bad. And we can remove trait with new approach to cross in 2d:

impl Vec2 {
...
pub fn cross(self) -> Vec2 {
    return Vec2::new(self.y, -self.x)
}
...
}
...
let a = Vec2::new(...);
let b = Vec2::new(...);
let c = 1f64; // orthogonal to plane vector with length 1
a.dot(b.cross()); // or b.cross().dot(a) is an old a.cross(b)
a.cross()*c; // a.cross(c)

Do we need `Point`?

It maybe necessary to separate points and vectors, but in general methods of Point are subset of Vec2 methods. And it can be removed in future.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.