16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 06:59:18 +02:00

build 180718. ai slope logic tweaks, track grade ui indicator, minor bug fixes

This commit is contained in:
tmj-fstate
2018-07-19 02:25:52 +02:00
parent 387f396ecb
commit cd10b72821
7 changed files with 121 additions and 84 deletions

View File

@@ -254,14 +254,14 @@ template <typename Type_>
Type_
interpolate( Type_ const &First, Type_ const &Second, float const Factor ) {
return ( First * ( 1.0f - Factor ) ) + ( Second * Factor );
return static_cast<Type_>( ( First * ( 1.0f - Factor ) ) + ( Second * Factor ) );
}
template <typename Type_>
Type_
interpolate( Type_ const &First, Type_ const &Second, double const Factor ) {
return ( First * ( 1.0 - Factor ) ) + ( Second * Factor );
return static_cast<Type_>( ( First * ( 1.0 - Factor ) ) + ( Second * Factor ) );
}
// tests whether provided points form a degenerate triangle