write comment about handling identical timestamps implicitly
This commit is contained in:
parent
76bafa4d0a
commit
8be3be4002
@ -79,10 +79,15 @@ pub struct InputState{
|
|||||||
}
|
}
|
||||||
impl InputState{
|
impl InputState{
|
||||||
fn set_next_mouse(&mut self,next_mouse:MouseState){
|
fn set_next_mouse(&mut self,next_mouse:MouseState){
|
||||||
|
// would this be correct?
|
||||||
|
// if self.next_mouse.time==next_mouse.time{
|
||||||
|
// self.next_mouse=next_mouse;
|
||||||
|
// }else{
|
||||||
//I like your functions magic language
|
//I like your functions magic language
|
||||||
self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse);
|
self.mouse=std::mem::replace(&mut self.next_mouse,next_mouse);
|
||||||
//equivalently:
|
//equivalently:
|
||||||
//(self.next_mouse,self.mouse)=(next_mouse,self.next_mouse.clone());
|
//(self.next_mouse,self.mouse)=(next_mouse,self.next_mouse.clone());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
fn replace_mouse(&mut self,mouse:MouseState,next_mouse:MouseState){
|
fn replace_mouse(&mut self,mouse:MouseState,next_mouse:MouseState){
|
||||||
(self.next_mouse,self.mouse)=(next_mouse,mouse);
|
(self.next_mouse,self.mouse)=(next_mouse,mouse);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user