input mouse mm: Make make_small truncf + license updates. No functional change expected.
Change-Id: Ib526e6417202951899ecb224b835648d7bd4afa4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/9912 Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
783ceb6c24
commit
99b68e8d36
@@ -1,8 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008-2011, Clemens Zeidler <[email protected]>
|
* Copyright 2008-2011, Clemens Zeidler <[email protected]>
|
||||||
* Copyright 2022, Haiku, Inc. All rights reserved.
|
* Copyright 2022-2025, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
|
*
|
||||||
|
* Authors:
|
||||||
|
* Stephan Aßmus <[email protected]>
|
||||||
|
* Augustin Cavalier <[email protected]>
|
||||||
|
* Adrien Destugues <[email protected]>
|
||||||
|
* Axel Dörfler <[email protected]>
|
||||||
|
* Fredrik Holmqvist <[email protected]>
|
||||||
|
* Michael Kanis <[email protected]>
|
||||||
|
* Sylvain Kerjean <[email protected]>
|
||||||
|
* Murai Takashi <[email protected]>
|
||||||
|
* PawanYr <[email protected]>
|
||||||
|
* Samuel Rodríguez Pérez <[email protected]>
|
||||||
|
* Clemens Zeidler <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "movement_maker.h"
|
#include "movement_maker.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -27,10 +41,7 @@
|
|||||||
static int32
|
static int32
|
||||||
make_small(float value)
|
make_small(float value)
|
||||||
{
|
{
|
||||||
if (value > 0)
|
return (int32)truncf(value);
|
||||||
return (int32)floorf(value);
|
|
||||||
else
|
|
||||||
return (int32)ceilf(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008-2011, Clemens Zeidler <[email protected]>
|
* Copyright 2008-2011, Clemens Zeidler <[email protected]>
|
||||||
* Copyright 2022, Haiku, Inc. All rights reserved.
|
* Copyright 2022-2025, Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef MOVEMENT_MAKER_H
|
#ifndef MOVEMENT_MAKER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user