1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

use scalar::Scalar;

#[derive(Debug,Clone,Copy)]
pub struct Point<S> {
    pub x: S,
    pub y: S,
}


impl<S> Point<S> 
where S: Scalar {
    pub fn new(x: S, y: S) -> Self {
        Point {
            x: x,
            y: y
        }
    }
    pub fn origin() -> Self {
        Point {
            x: S::zero(),
            y: S::zero()
        }
    }    
}