mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 14:43:33 +02:00
Standardverschiebung für Shape#nextTo()
This commit is contained in:
@@ -71,6 +71,11 @@ public class Constants {
|
|||||||
*/
|
*/
|
||||||
public static final int STD_FONTSIZE = 14;
|
public static final int STD_FONTSIZE = 14;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standardwert für den Abstand von Formen.
|
||||||
|
*/
|
||||||
|
public static final int STD_BUFFER = 10;
|
||||||
|
|
||||||
public static final Options.StrokeType SOLID = Options.StrokeType.SOLID;
|
public static final Options.StrokeType SOLID = Options.StrokeType.SOLID;
|
||||||
|
|
||||||
public static final Options.StrokeType DASHED = Options.StrokeType.DASHED;
|
public static final Options.StrokeType DASHED = Options.StrokeType.DASHED;
|
||||||
@@ -759,6 +764,10 @@ public class Constants {
|
|||||||
return from + t * (to - from);
|
return from + t * (to - from);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final double morph( double from, double to, double t ) {
|
||||||
|
return interpolate(from, to, limit(t, 0.0, 1.0));
|
||||||
|
}
|
||||||
|
|
||||||
public static final double map( double value, double fromMin, double fromMax, double toMin, double toMax ) {
|
public static final double map( double value, double fromMin, double fromMax, double toMin, double toMax ) {
|
||||||
return interpolate(toMin, toMax, (value - fromMin) / (fromMax - fromMin));
|
return interpolate(toMin, toMax, (value - fromMin) / (fromMax - fromMin));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user