1 Commits
3 changed files with 6 additions and 8 deletions
-2
View File
@@ -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 from .src.comfymath.graphics import NODE_CLASS_MAPPINGS as graphics_NCM
NODE_CLASS_MAPPINGS = { NODE_CLASS_MAPPINGS = {
**convert_NCM, **convert_NCM,
**bool_NCM, **bool_NCM,
+5 -5
View File
@@ -33,7 +33,7 @@ class IntToBool:
class FloatToInt: class FloatToInt:
@classmethod @classmethod
def INPUT_TYPES(cls) -> Mapping[str, Any]: 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",) RETURN_TYPES = ("INT",)
FUNCTION = "op" FUNCTION = "op"
@@ -85,7 +85,7 @@ class NumberToInt:
class FloatToNumber: class FloatToNumber:
@classmethod @classmethod
def INPUT_TYPES(cls) -> Mapping[str, Any]: 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",) RETURN_TYPES = ("NUMBER",)
FUNCTION = "op" FUNCTION = "op"
@@ -113,8 +113,8 @@ class ComposeVec2:
def INPUT_TYPES(cls) -> Mapping[str, Any]: def INPUT_TYPES(cls) -> Mapping[str, Any]:
return { return {
"required": { "required": {
"x": ("FLOAT", {"default": 0.0}), "x": ("FLOAT", {"default": 0.0, "round": False}),
"y": ("FLOAT", {"default": 0.0}), "y": ("FLOAT", {"default": 0.0, "round": False}),
} }
} }
@@ -131,7 +131,7 @@ class FillVec2:
def INPUT_TYPES(cls) -> Mapping[str, Any]: def INPUT_TYPES(cls) -> Mapping[str, Any]:
return { return {
"required": { "required": {
"a": ("FLOAT", {"default": 0.0}), "a": ("FLOAT", {"default": 0.0, "round": False}),
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@ import math
from typing import Any, Callable, Mapping 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]] = { FLOAT_UNARY_OPERATIONS: Mapping[str, Callable[[float], float]] = {
"Neg": lambda a: -a, "Neg": lambda a: -a,