对像素进行取整保证在不同分辨率下保持清晰

This commit is contained in:
yhh
2021-05-25 11:16:49 +08:00
parent da3ab02a8d
commit 6c44d38c10
8 changed files with 53 additions and 45 deletions

View File

@@ -456,6 +456,10 @@ module es {
return t - Math.floor(t / length) * length;
}
public static floorToInt(f: number) {
return Math.trunc(Math.floor(f));
}
/**
* 将值绕一圈移动的助手
* @param position