Compare commits
1
Commits
main
...
float-precision
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04aa1cb105 |
@@ -8,8 +8,6 @@ from .src.comfymath.control import NODE_CLASS_MAPPINGS as control_NCM
|
||||
from .src.comfymath.graphics import NODE_CLASS_MAPPINGS as graphics_NCM
|
||||
|
||||
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
**convert_NCM,
|
||||
**bool_NCM,
|
||||
|
||||
@@ -33,7 +33,7 @@ class IntToBool:
|
||||
class FloatToInt:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> Mapping[str, Any]:
|
||||
return {"required": {"a": ("FLOAT", {"default": 0.0})}}
|
||||
return {"required": {"a": ("FLOAT", {"default": 0.0, "round": False})}}
|
||||
|
||||
RETURN_TYPES = ("INT",)
|
||||
FUNCTION = "op"
|
||||
@@ -85,7 +85,7 @@ class NumberToInt:
|
||||
class FloatToNumber:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> Mapping[str, Any]:
|
||||
return {"required": {"a": ("FLOAT", {"default": 0.0})}}
|
||||
return {"required": {"a": ("FLOAT", {"default": 0.0, "round": False})}}
|
||||
|
||||
RETURN_TYPES = ("NUMBER",)
|
||||
FUNCTION = "op"
|
||||
@@ -113,8 +113,8 @@ class ComposeVec2:
|
||||
def INPUT_TYPES(cls) -> Mapping[str, Any]:
|
||||
return {
|
||||
"required": {
|
||||
"x": ("FLOAT", {"default": 0.0}),
|
||||
"y": ("FLOAT", {"default": 0.0}),
|
||||
"x": ("FLOAT", {"default": 0.0, "round": False}),
|
||||
"y": ("FLOAT", {"default": 0.0, "round": False}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class FillVec2:
|
||||
def INPUT_TYPES(cls) -> Mapping[str, Any]:
|
||||
return {
|
||||
"required": {
|
||||
"a": ("FLOAT", {"default": 0.0}),
|
||||
"a": ("FLOAT", {"default": 0.0, "round": False}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import math
|
||||
|
||||
from typing import Any, Callable, Mapping
|
||||
|
||||
DEFAULT_FLOAT = ("FLOAT", {"default": 0.0})
|
||||
DEFAULT_FLOAT = ("FLOAT", {"default": 0.0, "step": 0.001, "round": False})
|
||||
|
||||
FLOAT_UNARY_OPERATIONS: Mapping[str, Callable[[float], float]] = {
|
||||
"Neg": lambda a: -a,
|
||||
|
||||
Reference in New Issue
Block a user