pub struct Point {
    pub x: f64,
    pub y: f64,
}
Expand description

Point, or Two Vector, depending on your perspective. A plot is a Collection of Points

Fields

x: f64y: f64

Implementations

Returns new Point

Arguments
  • x - prim@f64 Independent Variable
  • y - prim@f64 Dependent Variable

Returns a new Point from a slice

Arguments
Example
use calcify::Point;
let point: Point = Point::from(&[1.0,1.0]);
Panics
  • slice length < 2

Returns a new Point with two random f64 from rand::Uniform between -1 and 1

Arguments
  • max - prim@f64: The absolute maximum value of each individule componant of the constituent Point
Example
use calcify::Point;
let vec2 = Point::random(10.0);

Returns the length of the 2vector

Example
use calcify::Point;
let vec2 = Point::new(1.0,0.0);
assert_eq!(vec2.r(),1.0);

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Return Self from string

Return a tuple of Self and a &u8 of remaining unparsed bytes from a byte array

Formats the value using the given formatter. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Dot product

Example
use calcify::Point;
let point = Point::new(2.0,2.0);

assert_eq!(
   point*point,
   8.0
);

The resulting type after applying the * operator.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Return object intensive json string Read more

Return Result wrapped Vec in MsgPack Format is not like to_json it is array intensive not object Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.